/**
 * WP Travel Transfer - Frontend Styles
 */

/* ========================================
   Transfer Checkout Line Items
   ======================================== */
.wtt-checkout-transfer-header td {
    padding-top: 15px !important;
    border-top: 1px solid #e0e0e0;
}

.wtt-checkout-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1e3a5f;
    font-size: 15px;
}

.wtt-checkout-transfer-route td {
    color: #555;
    font-size: 13px;
}

.wtt-checkout-transfer-detail td {
    color: #777;
    font-size: 12px;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.wtt-checkout-transfer-total td {
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e0e0e0;
}

/* ========================================
   Transfer Tour Details Box (Sidebar)
   ======================================== */
.wtt-checkout-transfer-box {
    background: #f8fbff;
    border: 1px solid #d5e5f5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.wtt-checkout-transfer-box .wpte-checkout__box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wtt-type-badge {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 12px;
}

.wtt-route-info {
    font-size: 14px;
    margin-bottom: 5px;
}

/* ========================================
   Single Transfer Page
   ======================================== */

/* Container */
.wtt-single-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wtt-single-transfer {
    margin-bottom: 40px;
}

/* Hero Image */
.wtt-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    max-height: 420px;
}

.wtt-hero__img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.wtt-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 60%);
}

.wtt-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 36px;
    color: #fff;
}

.wtt-hero__title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.wtt-hero__route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

.wtt-hero__route svg {
    flex-shrink: 0;
    stroke: #F9D617;
}

/* Page Header (no image fallback) */
.wtt-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F9D617;
}

.wtt-page-header__title {
    font-size: 28px;
    font-weight: 700;
    color: #0E477F;
    margin: 0 0 6px;
}

.wtt-page-header__route {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Two Column Layout */
.wtt-single-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Info Bar */
.wtt-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fb;
    border-radius: 12px;
    margin-bottom: 28px;
    border: 1px solid #eef1f5;
}

.wtt-info-bar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.wtt-info-bar__item svg {
    color: #0E477F;
    flex-shrink: 0;
}

/* Section Titles */
.wtt-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F9D617;
}

/* Content */
.wtt-single-content {
    margin-bottom: 28px;
}

.wtt-content-body {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.wtt-content-body p {
    margin-bottom: 12px;
}

/* Notes */
.wtt-single-notes {
    margin-bottom: 28px;
}

.wtt-notes-body {
    background: #fffdf0;
    border: 1px solid #F9D617;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* ========================================
   Booking Card (Sidebar)
   ======================================== */
.wtt-single-sidebar {
    position: sticky;
    top: 100px;
}

.wtt-booking-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.wtt-booking-card__header {
    background: #0E477F;
    padding: 20px 24px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wtt-booking-card__from {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.wtt-booking-card__price {
    font-size: 28px;
    font-weight: 700;
    color: #F9D617;
}

/* Booking Form */
.wtt-booking-form {
    padding: 20px 24px;
}

.wtt-booking-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.wtt-booking-form label small {
    font-weight: 400;
    color: #999;
}

.wtt-booking-form select,
.wtt-booking-form input[type="text"],
.wtt-booking-form input[type="date"],
.wtt-booking-form input[type="time"],
.wtt-booking-form input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}

.wtt-booking-form select:focus,
.wtt-booking-form input:focus {
    border-color: #0E477F;
    outline: none;
    box-shadow: 0 0 0 2px rgba(14, 71, 127, 0.1);
}

/* 2-column rows */
.wtt-bform-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.wtt-bform-field {
    flex: 1 1 0;
    min-width: 0;
}

.wtt-bform-field--full {
    flex: 1 1 100%;
}

/* Travelers / Pax */
.wtt-travelers-section {
    margin-bottom: 0;
}

.wtt-pax-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f9fafb;
}

.wtt-pax-category-item:last-of-type {
    margin-bottom: 0;
}

.wtt-pax-cat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wtt-pax-cat-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wtt-pax-cat-price {
    font-size: 12px;
    color: #888;
}

.wtt-pax-cat-price del {
    color: #bbb;
    margin-right: 4px;
}

.wtt-pax-cat-qty,
.wtt-pax-simple-qty {
    display: flex;
    align-items: center;
    gap: 0;
}

.wtt-qty-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0E477F;
    transition: all 0.15s;
    user-select: none;
}

.wtt-qty-btn:hover {
    background: #0E477F;
    border-color: #0E477F;
    color: #fff;
}

.wtt-qty-btn:active {
    background: #0a3561;
}

.wtt-qty-minus {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.wtt-qty-plus {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.wtt-qty-input {
    width: 48px !important;
    height: 34px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    padding: 0 !important;
    background: #f9fafb;
    color: #333;
    -moz-appearance: textfield;
}

.wtt-qty-input::-webkit-outer-spin-button,
.wtt-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price Display */
.wtt-price-display {
    text-align: center;
    padding: 14px;
    background: #f0f4f8;
    border-radius: 10px;
    margin: 16px 0;
}

.wtt-price-display .wtt-price-label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
}

.wtt-price-amount {
    font-size: 26px;
    font-weight: 700;
    color: #0E477F;
}

.wtt-price-amount.wtt-loading {
    opacity: 0.4;
}

/* Book Now Button */
.wtt-add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #F9D617;
    color: #0E477F;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
}

.wtt-add-to-cart-btn:hover {
    background: #e6c30e;
    transform: translateY(-1px);
}

.wtt-add-to-cart-btn:active {
    transform: translateY(0);
}

.wtt-add-to-cart-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.wtt-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ========================================
   Transfer Search Form V2 (Amstar Style)
   ======================================== */
.wtt-search-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 0;
    margin: 0 auto 30px;
}

.wtt-search-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Row 1 (transfer type / travelers) — hidden by default in single-row mode,
   shown only when those fields are enabled */
.wtt-search-row--top {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 10px 20px;
}

.wtt-search-row--top:empty {
    display: none;
}

/* Row 2 — main row: single line with dividers */
.wtt-search-row--bottom {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    min-height: 60px;
}

.wtt-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
}

.wtt-search-field {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

/* Vertical dividers between fields */
.wtt-search-row--bottom .wtt-search-field + .wtt-search-field::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #e0e0e0;
}

/* No divider before the submit button */
.wtt-search-row--bottom .wtt-field-submit::before {
    display: none;
}

.wtt-field-submit {
    flex: 0 0 auto;
    padding: 8px 8px 8px 0;
    display: flex;
    align-items: center;
}

/* Custom Select — flat style, no borders */
.wtt-custom-select,
.wtt-travelers-dropdown,
.wtt-date-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s;
    height: 100%;
    box-sizing: border-box;
    min-height: 60px;
    user-select: none;
}

.wtt-custom-select:hover,
.wtt-travelers-dropdown:hover,
.wtt-date-field:hover {
    background: #f9f9f9;
}

.wtt-custom-select.open,
.wtt-travelers-dropdown.open {
    background: #f5f5f5;
    box-shadow: none;
}

/* Bordered variant — no longer needed, reset */
.wtt-select--bordered {
    border: none;
    border-radius: 0;
}

.wtt-select--bordered:hover {
    border-color: transparent;
}

/* Field icon */
.wtt-field-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    color: #999;
}

.wtt-icon--accent {
    color: #0E477F;
}

/* Select label / content */
.wtt-select-label,
.wtt-travelers-summary {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wtt-select-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wtt-select-title {
    display: none;
}

.wtt-select-value {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wtt-select-arrow {
    flex: 0 0 auto;
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.wtt-custom-select.open .wtt-select-arrow,
.wtt-travelers-dropdown.open .wtt-select-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.wtt-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
}

.wtt-custom-select.open .wtt-dropdown,
.wtt-travelers-dropdown.open .wtt-dropdown {
    display: block;
}

.wtt-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.wtt-dropdown li {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.wtt-dropdown li:hover {
    background: #fef9e0;
}

.wtt-dropdown li.selected {
    background: #fef9e0;
    font-weight: 600;
    color: #0E477F;
}

.wtt-dropdown li.wtt-dropdown-group {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 4px;
    cursor: default;
    background: none;
}

.wtt-dropdown li.wtt-dropdown-group:hover {
    background: none;
}

/* Travelers dropdown */
.wtt-dropdown--travelers {
    padding: 12px 16px;
    min-width: 220px;
}

.wtt-traveler-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wtt-traveler-counter:last-child {
    border-bottom: none;
}

.wtt-traveler-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wtt-counter-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.wtt-counter-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0E477F;
    transition: all 0.15s;
    user-select: none;
}

.wtt-counter-btn:hover {
    background: #0E477F;
    border-color: #0E477F;
    color: #fff;
}

.wtt-counter-minus {
    border-radius: 6px 0 0 6px;
}

.wtt-counter-plus {
    border-radius: 0 6px 6px 0;
}

.wtt-counter-input {
    width: 40px;
    height: 30px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: #fafafa;
    color: #333;
    -moz-appearance: textfield;
}

.wtt-counter-input::-webkit-outer-spin-button,
.wtt-counter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date field */
.wtt-date-input {
    border: none;
    background: none;
    font-size: 13px;
    color: #666;
    padding: 0;
    width: 100%;
    cursor: pointer;
    outline: none;
}

.wtt-date-input:focus {
    outline: none;
    box-shadow: none;
}

/* Search button */
.wtt-search-btn-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    background: #F9D617;
    color: #0E477F;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    min-height: 44px;
}

.wtt-search-btn-v2:hover {
    background: #e6c30e;
    transform: translateY(-1px);
}

.wtt-search-btn-v2:active {
    transform: translateY(0);
}

/* Legacy search form (backward compat) */
.wtt-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wtt-search-form .wtt-form-row {
    flex: 1 1 200px;
    margin-bottom: 0;
}

.wtt-search-form .wtt-search-btn {
    flex: 0 0 auto;
    align-self: flex-end;
}

/* ========================================
   Transfer List / Grid
   ======================================== */
.wtt-transfer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wtt-transfer-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    background: #fff;
}

.wtt-transfer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wtt-transfer-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.wtt-transfer-card-body {
    padding: 16px;
}

.wtt-transfer-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.wtt-transfer-card-route {
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
}

.wtt-transfer-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 12px;
}

.wtt-transfer-card-price del {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.wtt-transfer-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #777;
    flex-wrap: wrap;
}

.wtt-transfer-card-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.wtt-transfer-card-link:hover {
    background: #135e96;
    color: #fff;
}

/* ========================================
   AJAX Loading State
   ======================================== */
.wtt-transfer-grid.wtt-loading,
.wtt-transfer-list.wtt-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
    min-height: 200px;
}

.wtt-transfer-grid.wtt-loading::after,
.wtt-transfer-list.wtt-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wtt-spin 0.8s linear infinite;
}

@keyframes wtt-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   No Results
   ======================================== */
.wtt-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.wtt-error {
    text-align: center;
    padding: 20px;
    color: #b32d2e;
    background: #fce8e8;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet: sidebar goes below content */
@media (max-width: 991px) {
    .wtt-single-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wtt-single-sidebar {
        position: static;
    }

    .wtt-booking-card {
        max-width: 500px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wtt-transfer-grid {
        grid-template-columns: 1fr;
    }

    /* Search form */
    .wtt-search-wrapper {
        border-radius: 16px;
    }

    .wtt-search-row--bottom {
        flex-wrap: wrap;
    }

    .wtt-search-row--bottom .wtt-search-field {
        flex: 1 1 100%;
        border-bottom: 1px solid #eee;
    }

    .wtt-search-row--bottom .wtt-search-field + .wtt-search-field::before {
        display: none;
    }

    .wtt-search-row--bottom .wtt-field-submit {
        flex: 1 1 100%;
        padding: 10px;
        border-bottom: none;
    }

    .wtt-search-btn-v2 {
        width: 100%;
        border-radius: 12px;
    }

    /* Single page */
    .wtt-hero {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
        max-height: 280px;
    }

    .wtt-hero__img {
        height: 280px;
    }

    .wtt-hero__content {
        padding: 20px;
    }

    .wtt-hero__title {
        font-size: 22px;
    }

    .wtt-hero__route {
        font-size: 14px;
    }

    .wtt-info-bar {
        gap: 10px;
        padding: 12px 14px;
    }

    .wtt-info-bar__item {
        font-size: 13px;
    }

    .wtt-section-title {
        font-size: 18px;
    }

    .wtt-booking-card {
        max-width: 100%;
        border-radius: 12px;
    }

    .wtt-booking-form {
        padding: 16px;
    }

    .wtt-bform-row {
        flex-direction: column;
        gap: 0;
    }

    .wtt-bform-field {
        margin-bottom: 14px;
    }

    .wtt-price-amount {
        font-size: 22px;
    }

    /* Legacy */
    .wtt-search-form.wtt-search-horizontal {
        flex-direction: column;
    }

    .wtt-search-form.wtt-search-horizontal .wtt-search-field {
        width: 100%;
    }
}
