/* ============================================
   Tour Booking Widget - Frontend Styles
   All rules scoped to .tbw-container for
   high specificity over Elementor Kit styles
   ============================================ */

.tbw-container {
    all: unset;
    display: block;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    padding: 22px 20px 20px;
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* --- Price Header --- */
.tbw-container .tbw-price-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f2f5;
}

.tbw-container .tbw-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

.tbw-container .tbw-from-label {
    font-size: 14px;
    color: #1e293b;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.tbw-container .tbw-original-price {
    font-size: 15px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.tbw-container .tbw-current-price {
    font-size: 36px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
}

.tbw-container .tbw-per-person {
    font-size: 15px;
    color: #1e293b;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* --- Field Groups --- */
.tbw-container .tbw-field-group {
    margin-bottom: 14px;
    padding: 0;
}

.tbw-container .tbw-field {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid #1e3a5f !important;
    border-radius: 12px !important;
    font-size: 15px;
    color: #64748b;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    font-family: inherit;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: normal;
}

.tbw-container .tbw-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
    color: #1e293b;
    outline: none;
}

.tbw-container .tbw-field::placeholder {
    color: #9baab8;
}

/* --- Date Button --- */
.tbw-container .tbw-date-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    background: #f0f3f7;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #3d5a80;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
    box-sizing: border-box;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: normal;
    font-family: inherit;
}

.tbw-container .tbw-date-btn:hover {
    background: #e4eaf2;
    color: #3d5a80;
    border-color: #c8d4e3;
    box-shadow: none;
}

.tbw-container .tbw-date-btn.tbw-has-date {
    color: #1e293b;
    background: #f0f3f7;
}

.tbw-container .tbw-date-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
}

.tbw-container .tbw-date-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #3d5a80;
    margin: 0;
    padding: 0;
}

.tbw-container .tbw-date-arrow {
    font-size: 10px;
    color: #3d5a80;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* --- Participants --- */
.tbw-container .tbw-participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    margin: 0;
    background: none;
    border: none;
}

.tbw-container .tbw-participant-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.tbw-container .tbw-participant-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a2433;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
}

.tbw-container .tbw-participant-sublabel {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
}

.tbw-container .tbw-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

/* --- Counter Buttons: circle outline --- */
.tbw-container .tbw-counter-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    border: 2px solid #2563eb;
    background: transparent;
    background-color: transparent;
    background-image: none;
    color: #2563eb;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    box-shadow: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    outline: none;
}

.tbw-container .tbw-counter-btn:hover:not(:disabled) {
    background: #2563eb;
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: none;
}

.tbw-container .tbw-counter-btn:focus {
    outline: none;
    box-shadow: none;
}

.tbw-container .tbw-counter-btn:disabled {
    border-color: #c8d4e3;
    color: #c8d4e3;
    cursor: not-allowed;
    background: transparent;
    background-color: transparent;
    opacity: 1;
}

/* --- Counter Value box --- */
.tbw-container .tbw-counter-val {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #dde3ea;
    border-radius: 6px;
    background: #fff;
    background-color: #fff;
    margin: 0;
    padding: 0;
    font-family: inherit;
    text-align: center;
    box-shadow: none;
}

.tbw-container .tbw-divider {
    height: 1px;
    background: #edf0f4;
    margin: 0;
    padding: 0;
    border: none;
}

/* --- Tour Option --- */
.tbw-container .tbw-option-group {
    margin-top: 10px;
    padding: 0;
}

.tbw-container .tbw-option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a2433;
    margin-bottom: 8px;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.tbw-container .tbw-select {
    border-radius: 12px;
    border: 1.5px solid #1e3a5f;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%231e3a5f' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #3d5a80;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.tbw-container .tbw-textarea {
    min-height: 90px;
    resize: vertical;
    font-family: inherit;
    border-radius: 12px;
}

/* --- Total Row --- */
.tbw-container .tbw-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 12px;
    border-top: 1px solid #edf0f4;
    border-bottom: none;
    border-left: none;
    border-right: none;
    margin-top: 6px;
    background: none;
}

.tbw-container .tbw-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a2433;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.tbw-container .tbw-total-amount {
    font-size: 26px;
    font-weight: 800;
    color: #dc2626;
    letter-spacing: -0.5px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* --- Main Button --- */
.tbw-container .tbw-btn {
    width: 100%;
    padding: 17px 24px;
    background: #2563eb;
    background-color: #2563eb;
    background-image: none;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.2px;
    margin-top: 2px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.30);
    display: block;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    font-family: inherit;
    line-height: normal;
    outline: none;
    box-sizing: border-box;
}

.tbw-container .tbw-btn:hover {
    background: #1d4ed8;
    background-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37,99,235,0.42);
    border: none;
    text-decoration: none;
}

.tbw-container .tbw-btn:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(37,99,235,0.30);
}

.tbw-container .tbw-btn:active {
    transform: scale(0.985);
}

.tbw-container .tbw-btn.tbw-loading {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Error Message --- */
.tbw-container .tbw-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef2f2;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
}

/* --- Badges --- */
.tbw-container .tbw-badges {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    background: none;
    border: none;
}

.tbw-container .tbw-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.tbw-container .tbw-badge-icon-wrap {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}

.tbw-container .tbw-badge-icon-wrap img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.tbw-container .tbw-badge-icon-svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: block;
}

.tbw-container .tbw-badge-icon-emoji {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.tbw-container .tbw-badge-text {
    font-size: 14px;
    color: #1a2433;
    font-weight: 500;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

/* ============================================
   Custom Popup Calendar (position:fixed —
   escapes any overflow:hidden Elementor parent)
   ============================================ */
.tbw-cal-popup {
    position: fixed !important;
    z-index: 999999 !important;
    width: 300px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbw-cal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.tbw-cal-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.tbw-cal-popup .tbw-cal-prev,
.tbw-cal-popup .tbw-cal-next {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 26px !important;
    color: #2563eb !important;
    line-height: 1 !important;
    padding: 2px 8px !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit !important;
}

.tbw-cal-popup .tbw-cal-prev:hover,
.tbw-cal-popup .tbw-cal-next:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.tbw-cal-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
}

.tbw-cal-dn {
    text-align: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    padding: 4px 0 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    background: none !important;
    border: none !important;
}

.tbw-cal-day {
    text-align: center !important;
    border-radius: 8px !important;
    padding: 8px 2px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    background: none !important;
    border: none !important;
    transition: background 0.12s, color 0.12s !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.tbw-cal-day:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.tbw-cal-today {
    color: #2563eb !important;
    font-weight: 700 !important;
    background: #eff6ff !important;
}

.tbw-cal-sel {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.tbw-cal-sel:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

.tbw-cal-past {
    color: #cbd5e1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: none !important;
}

/* Mobile full width */
@media (max-width: 767px) {
    .tbw-container {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px !important;
        padding: 18px 16px !important;
        box-sizing: border-box !important;
    }
}

/* ============================================
   Mobile Sticky Bottom Bar
   ============================================ */

/* Desktop: always hidden */
@media (min-width: 768px) {
    .tbw-sticky-bar {
        display: none !important;
    }
}

/* Mobile: visible by default (CSS fallback in case JS is delayed/blocked) */
@media (max-width: 767px) {
    .tbw-sticky-bar {
        display: flex;
    }
}

/* Base styles — JS sets display:flex on mobile */
.tbw-sticky-bar {
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 16px 18px;
    background: #ffffff;
    box-shadow: 0 -3px 16px rgba(0,0,0,0.13);
    z-index: 999999;
    box-sizing: border-box;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbw-sticky-price {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tbw-sticky-amount {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.tbw-sticky-cur {
    font-size: 22px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1.1;
}

.tbw-sticky-bar .tbw-per-person {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.tbw-sticky-badge {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 2px 8px;
    display: inline-block;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    box-shadow: none;
    margin: 0;
}

.tbw-sticky-btn {
    flex-shrink: 0;
    padding: 13px 22px;
    background-color: #2563eb;
    background-image: none;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    transition: background-color 0.2s;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    outline: none;
    line-height: 1.2;
    height: auto;
    width: auto;
    min-width: 0;
    margin: 0;
    display: inline-block;
}

.tbw-sticky-btn:hover,
.tbw-sticky-btn:active {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}
