:root {
    --primary-yellow: #fbc02d;
    --primary-yellow-hover: #f9a825;
    --bg-dark-card: #0a0a0a;
    --glass-bg: rgba(25, 25, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-muted: #9e9e9e;
}

.tfb-wrapper {
    position: relative;
    width: 100%;
    min-height: 90vh;
    height: 90dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    pointer-events: none;
    /* Allow maps behind to be scrolled */
}

.tfb-floating-card,
.tfb-map-controls,
.tfb-modal {
    pointer-events: auto;
    /* Re-enable for interactive parts */
}

.tfb-full-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000;
    pointer-events: auto;
}

.tfb-floating-card {
    position: relative;
    top: 30px;
    left: 30px;
    z-index: 100;
    width: 440px;
    height: 90dvh;
    overflow-y: auto;
    background: rgba(30, 45, 50, 0.96);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 36px;
    color: var(--text-white);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tfb-floating-card::-webkit-scrollbar {
    width: 6px;
}

.tfb-floating-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.tfb-floating-card::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 10px;
}

.tfb-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px 0 !important;
    line-height: 1.1;
}

.tfb-header p {
    font-size: 14px;
    color: var(--text-white);
    opacity: 0.8;
    margin-bottom: 24px !important;
}

.tfb-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.tfb-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--glass-border);
}

.tfb-icon {
    font-size: 20px;
    color: var(--primary-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
}

.tfb-input-field {
    flex: 1;
}

.tfb-input-field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 2px !important;
}

.tfb-input-field input {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 15px !important;
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
}

.tfb-input-field input::placeholder {
    color: var(--text-muted);
}

.tfb-toggle-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.tfb-toggle-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tfb-toggle-btn.active {
    background: var(--primary-yellow);
    color: #000;
    border-color: var(--primary-yellow);
}

.tfb-vehicles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.tfb-vehicle-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tfb-vehicle-item.active {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 10px rgba(251, 192, 45, 0.2);
}

.tfb-v-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.tfb-vehicle-item.active .tfb-v-icon {
    background: var(--primary-yellow);
    color: #000;
}

.tfb-v-body {
    flex: 1;
}

.tfb-v-title {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tfb-v-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.tfb-v-badge {
    font-size: 8px;
    padding: 2px 8px;
    border-radius: 99px;
    color: #000;
    font-weight: 800;
    margin-left: 4px;
    text-transform: uppercase;
}

.tfb-v-badge.orange {
    background: #ff9800;
}

.tfb-v-badge.yellow {
    background: var(--primary-yellow);
}

.tfb-v-meta {
    text-align: right;
}

.tfb-v-price-label {
    font-size: 9px;
    font-weight: 700;
    color: #ff9a00;
    letter-spacing: 0.5px;
}

.tfb-v-price {
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    margin: 1px 0;
}

.tfb-v-seats {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.tfb-v-seats i {
    font-size: 14px;
}

/* Hide Flagfall Logic */
.tfb-wrapper.tfb-hide-flagfall .tfb-v-price-label,
.tfb-wrapper.tfb-hide-flagfall .tfb-v-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.tfb-schedule-container {
    background: rgba(30, 45, 50, 0.4);
    border: 1px solid var(--primary-yellow);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    color: #fff;
}

.tfb-schedule-header {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tfb-cal-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#tfb_cal_month_display {
    font-size: 24px;
    font-weight: 800;
}

.tfb-cal-month-nav span {
    cursor: pointer;
    font-size: 24px;
    opacity: 0.6;
}

.tfb-cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.tfb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px 0;
    text-align: center;
}

.tfb-cal-day {
    padding: 10px 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    color: rgba(255, 255, 255, 0.3);
}

.tfb-cal-day.current-month {
    color: #fff;
}

.tfb-cal-day.selected {
    color: #fff;
}

.tfb-cal-day.selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.tfb-section-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 30px 0 15px 0;
}

.tfb-time-picker-row {
    display: flex;
    gap: 12px;
}

.tfb-time-col {
    flex: 1;
}

.tfb-time-col label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tfb-time-col select {
    width: 100% !important;
    background: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    color: #000 !important;
    padding: 12px !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    appearance: none !important;
}

.tfb-confirm-btn {
    width: 100%;
    background: var(--primary-yellow);
    color: #000;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tfb-confirm-btn:hover {
    background: var(--primary-yellow-hover);
}

.tfb-confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tfb-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Premium Modal Styling */
.tfb-modal {
    display: none;
    position: absolute;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    overflow-y: auto;
    padding: 20px 0;
}

.tfb-modal-content {
    margin: 40px auto;
    width: 90%;
    max-width: 540px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: tfbFadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tfbFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tfb-close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
    transition: color 0.2s ease;
}

.tfb-close:hover {
    color: #fff;
}

.tfb-modal-header {
    padding: 40px 40px 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
}

.tfb-modal-header h3 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0 !important;
}

.tfb-modal-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 !important;
}

.tfb-modal-body {
    padding: 0 40px 30px;
}

.tfb-trip-summary {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tfb-summary-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tfb-summary-item i {
    color: var(--primary-yellow);
    font-size: 20px;
    margin-top: 2px;
}

.tfb-sum-text label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.tfb-sum-text span {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.tfb-booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tfb-form-row {
    display: flex;
    gap: 20px;
}

.tfb-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tfb-form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding-left: 4px;
}

.tfb-form-group input,
.tfb-form-group textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    color: #fff !important;
    font-size: 15px !important;
    outline: none !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tfb-form-group input:focus,
.tfb-form-group textarea:focus {
    border-color: var(--primary-yellow) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.tfb-modal-footer {
    padding: 30px 40px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tfb-final-fare {
    display: flex;
    flex-direction: column;
}

.tfb-final-fare span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.tfb-final-fare strong {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-yellow);
}

.tfb-btn-primary {
    background: var(--primary-yellow);
    color: #000;
    border: none;
    padding: 18px 30px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(251, 192, 45, 0.3);
}

.tfb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(251, 192, 45, 0.4);
}

@media (max-width: 600px) {
    .tfb-modal-content {
        margin: 10px;
        width: auto;
        border-radius: 20px;
    }

    .tfb-modal-header,
    .tfb-modal-body,
    .tfb-modal-footer {
        padding: 25px;
    }

    .tfb-form-row {
        flex-direction: column;
        gap: 20px;
    }

    .tfb-modal-footer {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .tfb-btn-primary {
        width: 100%;
    }
}

.tfb-map-controls {
    position: absolute;
    right: 30px;
    bottom: 50px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tfb-map-controls button {
    width: 48px;
    height: 48px;
    background: rgba(30, 45, 50, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tfb-map-controls button:hover {
    background: var(--primary-yellow);
    color: #000;
    border-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.tfb-fixed-toggle-row {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tfb-fixed-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

.tfb-fixed-icon {
    min-width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
}

.tfb-fixed-text strong {
    display: block !important;
    font-size: 16px !important;
    color: #fff !important;
    margin: 0 !important;
}

.tfb-fixed-text p {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    margin: 2px 0 0 0 !important;
}

/* Toggle Switch Styles */
.tfb-switch {
    position: relative !important;
    display: inline-block !important;
    min-width: 46px !important;
    height: 24px !important;
    margin: 0 !important;
}

.tfb_hide_check {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

.tfb-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3e4d51 !important;
    transition: .4s !important;
    border-radius: 34px !important;
}

.tfb-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    transition: .4s !important;
    border-radius: 50% !important;
}

input:checked+.tfb-slider {
    background-color: #00c853 !important;
}

input:checked+.tfb-slider:before {
    transform: translateX(22px) !important;
}

.tfb-fare-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(251, 192, 45, 0.4);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

/* Fixed Breakdown State */
.tfb-fare-breakdown.fixed-mode {
    background: rgba(0, 200, 83, 0.05);
    border: 1px solid #00c853;
}

.tfb-fare-breakdown.fixed-mode .tfb-fb-title,
.tfb-fare-breakdown.fixed-mode .tfb-fb-range,
.tfb-fare-breakdown.fixed-mode .tfb-fb-footer {
    color: #4caf50;
}

.tfb-fare-breakdown.fixed-mode .tfb-fb-title i {
    background: #4caf50;
    color: #fff;
}

.tfb-fixed-banner {
    display: none;
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.fixed-mode .tfb-fixed-banner {
    display: flex;
}

.fixed-mode .tfb-fb-details,
.fixed-mode .tfb-fb-footer {
    display: none;
}

.fixed-mode .tfb-fb-main-msg {
    margin-top: -10px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 700;
    color: #4caf50;
}

.tfb-fb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tfb-fb-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-yellow);
    letter-spacing: 0.5px;
}

.tfb-fb-title i {
    background: var(--primary-yellow);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-style: normal;
}

.tfb-fb-badge {
    background: rgba(30, 80, 255, 0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.tfb-fb-range {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
}

.tfb-fb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.tfb-fb-block {
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    color: #000;
}

.tfb-fb-block label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #666;
    margin-bottom: 4px;
}

.tfb-fb-block span {
    font-size: 14px;
    font-weight: 800;
}

.tfb-fb-details {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tfb-fb-type-label {
    background: #5d87ff;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
}

.tfb-fb-type-text {
    font-size: 12px;
    color: var(--text-muted);
}

.tfb-fb-footer {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.tfb-fb-footer a {
    color: inherit;
    text-decoration: underline;
}

/* Tablet Responsiveness */
@media (max-width: 1024px) {
    .tfb-floating-card {
        height: auto !important;
        overflow-y: visible !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tfb-floating-card {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 20px !important;
        background: #0f1719 !important;
        z-index: 10 !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    .tfb-wrapper {
        display: flex !important;
        flex-direction: column-reverse !important;
        height: auto !important;
        min-height: unset !important;
    }

    .tfb-full-map {
        height: 350px !important;
        position: relative !important;
        width: 100% !important;
        z-index: 1 !important;
        pointer-events: auto !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .tfb-map-controls {
        bottom: 20px;
        right: 15px;
    }
}