/* General Styles */

.classes-view {
    margin: 0px;
}

.view-switcher {
    margin-top: 20px;  
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-switcher button {
    padding: 10px 20px !important;
    border: 2px solid transparent !important;
    background-color: #47A6BD !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

.view-switcher button:hover {
    background-color: #fff !important;
    color: #47A6BD !important;
    border: 2px solid #47A6BD !important;
}

/* Active State Button Styles */
.elementor-kit-12 button:focus, .elementor-kit-12 input[type="button"]:focus, .elementor-kit-12 input[type="submit"]:focus {    
    background-color: #47A6BD;
    color: #fff;
}

/* Additional Buttons */
.additional-buttons {
    margin-left: auto; /* Push the buttons to the right */
    margin-top: 20px; /* Add padding between the view buttons and training option buttons */
}

.additional-buttons a {
    padding: 10px 20px !important;
    border: 2px solid #47A6BD !important;
    background-color: #47A6BD !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    margin-left: 10px !important;
}

.additional-buttons a:hover {
    background-color: #fff !important;
    color: #47A6BD !important;
    border: 2px solid #47A6BD !important;
}

/* Styles for List View */
.classes-table-container {
    width: 100%;
    overflow-x: auto;
}

.classes-table {
    width: 100%;
    border-collapse: collapse;
}

.classes-table th, .classes-table td {
    padding: 10px;
    border: 1px solid #ddd !important;
}

.classes-table th {
    background-color: #f4f4f4;
    text-align: left;
}

.classes-table td {
    vertical-align: top;
}

.classes-table td a {
    display: block;
    text-decoration: none;
    color: #47A6BD;
}

.classes-table td a:hover {
    text-decoration: underline;
}

/* Center the booking link */
.classes-table td:last-child {
    text-align: center;
}

/* Column width adjustments */
.classes-table th:nth-child(4), .classes-table td:nth-child(4) {
    width: 20%; /* Adjust width of booking link column */
}

.classes-table th:nth-child(3), .classes-table td:nth-child(3) {
    width: 25%; /* Adjust width of location column */
}

.classes-table th:nth-child(2), .classes-table td:nth-child(2) {
    width: 33%; /* Adjust width of date column */
}

.classes-table th:nth-child(1), .classes-table td:nth-child(1) {
    width: 22%; /* Adjust width of class title column */
}

/* Styles for Calendar View */
.classes-calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensure equal width columns */
}

.classes-calendar th, .classes-calendar td {
    padding: 10px;
    border: 1px solid #ddd;
}

.classes-calendar th {
    background-color: #f4f4f4;
    text-align: left;
}

.classes-calendar td {
    vertical-align: top;
}

.classes-calendar td a {
    display: block;
    text-decoration: none;
    color: #47A6BD;
}

.classes-calendar td a:hover {
    text-decoration: underline;
}

/* Center the booking link */
.classes-calendar td:last-child {
    text-align: center;
}

/* Column width adjustments */
.classes-calendar th:nth-child(5), .classes-calendar td:nth-child(5) {
    width: 10%; /* Adjust width of booking link column */
}

.classes-calendar th:nth-child(4), .classes-calendar td:nth-child(4) {
    text-align: center;  
    width: 10%; /* Adjust width of price column */
}

.classes-calendar th:nth-child(3), .classes-calendar td:nth-child(3) {
    width: 30%; /* Adjust width of location column */
}

.classes-calendar th:nth-child(2), .classes-calendar td:nth-child(2) {
    width: 15%; /* Adjust width of title column */
}

.classes-calendar th:nth-child(1), .classes-calendar td:nth-child(1) {
    width: 25%; /* Adjust width of date column */
}

/* Padding adjustments for Calendar View */
.classes-calendar-container h2 {
    padding-top: 20px; /* More padding above month */
    padding-bottom: 10px; /* Less padding below month */
}

/* Media Queries for Tablet and Mobile Views */
@media (max-width: 1125px) {
    /* Make filter, view, and additional buttons stack in tablet view */
    .view-switcher,
    .classes-filter,
    .additional-buttons {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    /* Buttons should have default width but centered */
    .view-switcher button,
    .additional-buttons a {
        margin: 0 10px 10px 10px;
    }

    /* Ensure all sections stack with padding underneath headings */
    .classes-filter {
        text-align: center;
        padding-bottom: 10px;
    }

    .view-switcher {
        text-align: center;
        padding-bottom: 10px;
    }

    .additional-buttons {
        text-align: center;
        padding-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .view-switcher button, .additional-buttons a {
        display: inline-block;
        width: 60%;
        margin-bottom: 10px;
        text-align: center;
        align-items: center;
        margin-top: 10px;
    }

    /* Center the date column on tablet and mobile */
    .classes-table td:nth-child(2), .classes-calendar td:nth-child(1) {
        text-align: center;
    }

    /* Short date format and calendar icon for booking link on mobile/tablet */
    .classes-table td:last-child a, .classes-calendar td:last-child a {
        text-align: center;
    }

    .calendar-icon {
        font-size: 18px;
        color: #47A6BD;
    }
}

@media (max-width: 480px) {
    .view-switcher button {
        font-size: 14px;
    }

    .classes-table th, .classes-table td {
        font-size: 12px;
        padding: 6px;
    }

    .classes-calendar th, .classes-calendar td {
        font-size: 12px;
        padding: 6px;
    }

    /* Adjust calendar icon size and alignment */
    .calendar-icon {
        font-size: 18px;
        color: #47A6BD;
        text-decoration: none;
    }

    .calendar-icon:hover {
        text-decoration: none;
        color: #333;
    }
}

@media (max-width: 1024px) {
    /* Hide the third column (Location) in both views */
    .classes-table td:nth-child(3),
    .classes-table th:nth-child(3),
    .classes-calendar td:nth-child(3),
    .classes-calendar th:nth-child(3) {
        display: none;
    }
}
