/* 
 * #A1 - GOND - SEE TOUR AVAILABILITY
 * Frontend Styles
 */

.a1-tour-availability-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.a1-plugin-version-top {
    text-align: right;
    font-size: 11px;
    color: #888;
    margin-bottom: 15px;
}

.a1-tour-filters-bar {
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.a1-title-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.a1-title-search-row .a1-display-view-select {
    flex: 0 0 50%;
    max-width: none;
    font-size: 16px;
    font-weight: 600;
}

.a1-current-view-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 0 0 50%;
}

.a1-title-search-row .a1-search-section {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
}

.a1-stats-advanced-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.a1-stats-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
}

.a1-dropdown-row {
    margin-bottom: 0;
}

.a1-display-view-select {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.a1-filters-row-3 {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
}

.a1-filters-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.a1-filters-row-2 {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
}

.a1-display-options-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #ddd;
}

.a1-display-options-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.a1-display-view-select {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.a1-display-view-select:focus {
    outline: none;
    border-color: #707857;
}

/* Graph View Styles */
.a1-graph-view {
    padding: 20px 0;
}

.a1-view-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.a1-graph-legend {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 10px 0;
}

.a1-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a1-legend-square {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.a1-legend-item span {
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.a1-graph-container-wrapper {
    overflow-x: auto;
    border: 2px solid #ddd;
}

.a1-graph-container {
    display: inline-flex;
    gap: 15px;
    min-width: 100%;
    padding: 20px;
    background: #fff;
}

.a1-graph-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 41px;
}

.a1-graph-month-label {
    font-size: 9px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    white-space: nowrap;
}

.a1-graph-squares {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.a1-graph-square {
    width: 20px;
    height: 20px;
    background-color: #f97c13;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    z-index: 777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    border: 2px solid transparent;
}

.a1-graph-square.low-spots {
    opacity: 0.5;
}

.a1-graph-square.past-date {
    opacity: 0.2;
}

.a1-graph-square.selected {
    border-color: black;
}

.a1-graph-square:hover {
    filter: brightness(0.9);
}

.a1-graph-tooltip {
    position: fixed;
    background: #34302a;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 1 !important;
}

.a1-toggle-count {
    font-weight: 100;
    font-style: italic;
    letter-spacing: 1px;
}

.a1-search-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.a1-search-section label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    font-size: 13px;
}

.a1-search-section input {
    flex: 1;
    max-width: 300px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.a1-search-section input:focus {
    outline: none;
    border-color: #707857;
    box-shadow: 0 0 0 2px rgba(112, 120, 87, 0.1);
}

.a1-toggle-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.a1-toggle-text {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    user-select: none;
    min-width: fit-content;
}

.a1-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin: 0;
}

.a1-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.a1-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

.a1-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.a1-toggle-switch input:checked + .a1-toggle-slider {
    background-color: #707857;
}

.a1-toggle-switch input:checked + .a1-toggle-slider:before {
    transform: translateX(20px);
}

.a1-toggle-label {
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    margin: 0;
    user-select: none;
    font-size: 13px;
    white-space: nowrap;
}

.a1-tour-stats {
    width: 100%;
    padding-top: 0px;
    margin-top: 0px;
    border-top: 0px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.a1-tour-stats.hidden {
    display: none;
}

.a1-stats-row {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 10px 0px;
    border-top: 1px solid #ddd;
}

.a1-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a1-stat-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    color: #707857;
}

.a1-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
}

.a1-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #707857;
}

.a1-stats-row-divider {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #ddd;
}

.a1-stats-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

.a1-departures-section {
    margin-top: 10px;
}

.a1-departures-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.a1-day-range-link {
    color: #707857;
    cursor: pointer;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
}

.a1-day-range-link:hover {
    background: #f0f0f0;
}

.a1-day-range-link.active {
    background: #707857;
    color: white;
    font-weight: 600;
}

.a1-departures-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.a1-departures-table th {
    text-align: left;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #2c3e50;
}

.a1-departures-table td {
    padding: 8px;
    border: 1px solid #ddd;
    color: #2c3e50;
}

.a1-departures-table tbody tr:hover {
    background: #f8f9fa;
}

.a1-plugin-version {
    font-size: 11px;
    color: #999;
    text-align: right;
    padding-top: 10px;
    margin-top: 10px;
}

.a1-no-results {
    padding: 44px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 30px;
}

.a1-tour-product {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.a1-tour-product.hidden {
    display: none;
}

.a1-tour-product-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #707857 !important;
    color: #fff !important;
    border-bottom: 0;
}

.a1-tour-product-image {
    flex-shrink: 0;
}

.a1-tour-product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.a1-tour-product-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.a1-tour-product-title a {
    color: #fff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.a1-tour-product-title a:hover {
    color: #f0f0f0 !important;
}

.a1-tour-variations-table-wrapper {
    padding: 0;
    overflow-x: auto;
}

.a1-tour-variations-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
    margin-bottom: 0;
}

.a1-tour-variations-table th:nth-child(1),
.a1-tour-variations-table td:nth-child(1) {
    width: 250px;
}

.a1-tour-variations-table th:nth-child(2),
.a1-tour-variations-table td:nth-child(2),
.a1-tour-variations-table th:nth-child(3),
.a1-tour-variations-table td:nth-child(3),
.a1-tour-variations-table th:nth-child(4),
.a1-tour-variations-table td:nth-child(4),
.a1-tour-variations-table th:nth-child(5),
.a1-tour-variations-table td:nth-child(5) {
    width: 137px;
}

.a1-tour-variations-table thead {
    background: #34302a !important;
    color: #fff !important;
}

.a1-tour-variations-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 400;
    font-size: 14px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.a1-tour-variations-table th:nth-child(2),
.a1-tour-variations-table th:nth-child(3),
.a1-tour-variations-table th:nth-child(4) {
    text-align: right;
}

.a1-tour-variations-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s ease;
}

.a1-tour-variations-table tbody tr.low-spots-row {
    background: #da6f042e;
}

.a1-tour-variations-table tbody tr:hover {
    background-color: #f8f9fa;
}

.a1-tour-variations-table tbody tr.low-spots-row:hover {
    background: #da6f0445;
}

.a1-tour-variations-table tbody tr.past-date-row {
    text-decoration: line-through;
    opacity: 0.6;
}

.a1-tour-variations-table tbody tr:last-child {
    border-bottom: none;
}

.a1-tour-variations-table td {
    padding: 12px 15px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    color: #2c3e50;
}

.a1-tour-variations-table td:nth-child(2),
.a1-tour-variations-table td:nth-child(3),
.a1-tour-variations-table td:nth-child(4) {
    text-align: right;
}

.book-now-cell {
    text-align: center;
}

.a1-book-now-btn {
    display: inline-block;
    color: #8db54e !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.a1-book-now-btn:hover {
    color: #7a9f43 !important;
    text-decoration: underline;
}

/* Responsive styles for mobile */
@media screen and (max-width: 768px) {
    .a1-tour-availability-wrapper {
        padding: 10px;
    }

    .a1-tour-product {
        margin-bottom: 30px;
    }

    .a1-tour-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .a1-tour-product-image img {
        width: 60px;
        height: 60px;
    }

    .a1-tour-product-title {
        font-size: 20px;
    }

    .a1-tour-variations-table-wrapper {
        padding: 0;
    }

    .a1-tour-variations-table thead {
        display: none;
    }

    .a1-tour-variations-table,
    .a1-tour-variations-table tbody,
    .a1-tour-variations-table tr,
    .a1-tour-variations-table td {
        display: block;
        width: 100%;
    }

    .a1-tour-variations-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        padding: 15px;
        background: #fff;
    }

    .a1-tour-variations-table tr:last-child {
        margin-bottom: 0;
    }

    .a1-tour-variations-table td {
        padding: 8px 0;
        border: none;
        position: relative;
        padding-left: 160px;
        min-height: 30px;
    }

    .a1-tour-variations-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 8px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: #555;
        width: 150px;
    }

    .a1-tour-variations-table td:last-child {
        border-bottom: none;
    }
    
    .book-now-cell {
        text-align: left;
        padding-top: 15px !important;
    }
    
    .book-now-cell:before {
        display: none;
    }
    
    .a1-book-now-btn {
        display: inline-block;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .a1-tour-product-title {
        font-size: 18px;
    }

    .a1-tour-variations-table td {
        padding-left: 140px;
        font-size: 13px;
    }

    .a1-tour-variations-table td:before {
        width: 130px;
        font-size: 11px;
    }
}

/* Password Protection Overlay */
.a1-password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.a1-password-modal {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.a1-password-header {
    text-align: center;
    margin-bottom: 20px;
}

.a1-password-header i {
    font-size: 48px;
    color: #707857;
    margin-bottom: 15px;
}

.a1-password-header h3 {
    margin: 0;
    font-size: 24px;
    color: #34302a;
}

.a1-password-modal p {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

#a1-password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.a1-password-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.a1-password-input:focus {
    outline: none;
    border-color: #707857;
}

.a1-password-submit {
    padding: 12px 24px;
    background: #707857;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.a1-password-submit:hover {
    background: #5a6045;
}

.a1-password-error {
    color: #d32f2f;
    text-align: center;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    margin-top: 10px;
}

.a1-tour-content {
    transition: filter 0.3s;
}

/* Lock icon in version bar when protected */
.a1-plugin-version-top.protected::before {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #707857;
}

/* Version Info Popup */
.a1-version-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.a1-version-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.a1-version-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}

.a1-version-popup-close:hover {
    color: #000;
}

.a1-version-popup-content h3 {
    margin: 0 0 15px 0;
    color: #34302a;
    font-size: 22px;
}

.a1-version-popup-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.a1-version-popup-content a {
    color: #707857;
    text-decoration: none;
}

.a1-version-popup-content a:hover {
    text-decoration: underline;
}
