/**
 * TourSure Flight List Styles
 * File: toursure-list-flight.css
 * Compatible with: toursure-tourlist.css theme
 */

/* ===========================
   CSS Variables (ใช้จาก theme หลัก)
   =========================== */
:root {
    --tsflt-primary: var(--tsl-primary, #5B21B6);
    --tsflt-primary-light: var(--tsl-primary-light, #7C3AED);
    --tsflt-primary-dark: var(--tsl-primary-dark, #4C1D95);
    --tsflt-success: var(--tsl-success, #10B981);
    --tsflt-warning: var(--tsl-warning, #F59E0B);
    --tsflt-gray-50: var(--tsl-gray-50, #F9FAFB);
    --tsflt-gray-100: var(--tsl-gray-100, #F3F4F6);
    --tsflt-gray-200: var(--tsl-gray-200, #E5E7EB);
    --tsflt-gray-300: var(--tsl-gray-300, #D1D5DB);
    --tsflt-gray-400: var(--tsl-gray-400, #9CA3AF);
    --tsflt-gray-500: var(--tsl-gray-500, #6B7280);
    --tsflt-gray-600: var(--tsl-gray-600, #4B5563);
    --tsflt-gray-700: var(--tsl-gray-700, #374151);
    --tsflt-gray-800: var(--tsl-gray-800, #1F2937);
    --tsflt-gray-900: var(--tsl-gray-900, #111827);
    --tsflt-radius: var(--tsl-radius, 8px);
    --tsflt-shadow-sm: var(--tsl-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    --tsflt-shadow: var(--tsl-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    --tsflt-shadow-md: var(--tsl-shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
    --tsflt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Container
   =========================== */
.tsflt-container-flt7k3 {
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--tsflt-gray-900);
}

/* ===========================
   Header
   =========================== */
.tsflt-header-flt7k3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tsflt-gray-200);
    flex-wrap: wrap;
    gap: 16px;
}

.tsflt-header-left-flt7k3 {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tsflt-title-flt7k3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--tsflt-gray-900);
    margin: 0;
}

.tsflt-stats-flt7k3 {
    display: flex;
    gap: 24px;
}

.tsflt-stat-item-flt7k3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-stat-label-flt7k3 {
    color: var(--tsflt-gray-500);
    font-size: 14px;
}

.tsflt-stat-value-flt7k3 {
    font-weight: 600;
    color: var(--tsflt-primary);
    font-size: 20px;
}

/* View Switcher */
.tsflt-view-switcher-flt7k3 {
    display: flex;
    gap: 8px;
    background: var(--tsflt-gray-100);
    padding: 4px;
    border-radius: var(--tsflt-radius);
}

.tsflt-view-btn-flt7k3 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--tsflt-gray-600);
    font-size: 14px;
    font-weight: 500;
    border-radius: calc(var(--tsflt-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s;
}

.tsflt-view-btn-flt7k3 svg {
    width: 18px;
    height: 18px;
}

.tsflt-view-btn-flt7k3:hover {
    background: var(--tsflt-gray-200);
    color: var(--tsflt-gray-900);
}

.tsflt-view-btn-flt7k3.active {
    background: white;
    color: var(--tsflt-primary);
    box-shadow: var(--tsflt-shadow-sm);
}

/* ===========================
   Filters
   =========================== */
.tsflt-filters-flt7k3 {
    background: white;
    border: 1px solid var(--tsflt-gray-200);
    border-radius: var(--tsflt-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--tsflt-shadow);
}

/* First row - Search box with actions inline */
.tsflt-filter-row-flt7k3:first-child {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.tsflt-filter-row-flt7k3:first-child .tsflt-filter-full-flt7k3 {
    flex: 1;
    min-width: 0;
}

/* Remove bottom gap in search group wrapper */
.tsflt-filter-row-flt7k3:first-child .tsflt-filter-group-flt7k3 {
    gap: 0;
    min-width: 0;
}

/* Search input: connected left side */
.tsflt-filter-row-flt7k3:first-child .tsflt-filter-input-flt7k3 {
    border-radius: var(--tsflt-radius) 0 0 var(--tsflt-radius);
    border-right: none;
    height: 100%;
    box-sizing: border-box;
}

.tsflt-filter-row-flt7k3:first-child .tsflt-filter-input-flt7k3:focus {
    border-right: none;
    position: relative;
    z-index: 1;
}

/* Actions: connected right side, no gap */
.tsflt-filter-row-flt7k3:first-child .tsflt-filter-actions-flt7k3 {
    gap: 0;
}

/* Primary button: middle segment (no radius) */
.tsflt-filter-row-flt7k3:first-child .tsl-btn-primary {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* Secondary button: right end (rounded right) */
.tsflt-filter-row-flt7k3:first-child .tsl-btn-secondary {
    border-radius: 0 var(--tsflt-radius) var(--tsflt-radius) 0;
    border-left: none;
}

.tsflt-filter-row-flt7k3 {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tsflt-filter-row-flt7k3:last-child {
    margin-bottom: 0;
}

.tsflt-filter-group-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.tsflt-filter-full-flt7k3 {
    width: 100%;
    min-width: 100%;
}

.tsflt-filter-label-flt7k3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--tsflt-gray-700);
    margin-bottom: 4px;
}

.tsflt-filter-input-flt7k3 {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--tsflt-gray-300);
    border-radius: var(--tsflt-radius);
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.tsflt-filter-input-flt7k3:focus {
    outline: none;
    border-color: var(--tsflt-primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.tsflt-filter-input-flt7k3:hover {
    border-color: var(--tsflt-gray-400);
}

select.tsflt-filter-input-flt7k3 {
    cursor: pointer;
    padding-right: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.tsflt-filter-range-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 280px;
}

.tsflt-filter-range-flt7k3 .tsflt-filter-label-flt7k3 {
    font-size: 13px;
    color: var(--tsflt-gray-700);
    font-weight: 600;
}

.tsflt-filter-range-inputs-flt7k3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-filter-range-inputs-flt7k3 .tsflt-filter-input-flt7k3 {
    flex: 1;
}

.tsflt-range-separator-flt7k3 {
    color: var(--tsflt-gray-500);
    font-size: 13px;
    white-space: nowrap;
}

/* ===========================
   Collapsible Filter Section
   =========================== */
.tsflt-filter-collapsible-flt7k3 {
    position: relative;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Collapsed state */
.tsflt-filter-collapsible-flt7k3.tsflt-filter-collapsed-flt7k3 {
    max-height: 50px;
}

/* Fade content when collapsed */
.tsflt-filter-collapsible-flt7k3.tsflt-filter-collapsed-flt7k3 > * {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

/* Gradient overlay when collapsed */
.tsflt-filter-collapsible-flt7k3.tsflt-filter-collapsed-flt7k3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 1) 100%
    );
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Expanded state */
.tsflt-filter-collapsible-flt7k3:not(.tsflt-filter-collapsed-flt7k3) > * {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tsflt-filter-collapsible-flt7k3:not(.tsflt-filter-collapsed-flt7k3)::after {
    opacity: 0;
    pointer-events: none;
}

/* Toggle button */
.tsflt-filter-toggle-flt7k3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 16px;
    margin-top: 4px;
    background: none;
    border: 1px dashed var(--tsflt-gray-300);
    border-radius: var(--tsflt-radius);
    color: var(--tsflt-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.tsflt-filter-toggle-flt7k3:hover {
    background: rgba(91, 33, 182, 0.04);
    border-color: var(--tsflt-primary);
}

.tsflt-filter-toggle-flt7k3:focus-visible {
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
    border-color: var(--tsflt-primary);
}

/* Arrow icon rotation */
.tsflt-toggle-icon-flt7k3 {
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Rotate arrow up when expanded */
.tsflt-filter-toggle-flt7k3.tsflt-toggle-expanded-flt7k3 .tsflt-toggle-icon-flt7k3 {
    transform: rotate(180deg);
}

/* Actions - Move to same row as search */
.tsflt-filter-actions-flt7k3 {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: stretch;
}

/* Button Styling */
.tsflt-filter-actions-flt7k3 .tsl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--tsflt-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tsflt-filter-actions-flt7k3 .tsl-btn .tsl-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Primary Button (Search) */
.tsflt-filter-actions-flt7k3 .tsl-btn-primary {
    background: linear-gradient(135deg, var(--tsflt-primary) 0%, var(--tsflt-primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(91, 33, 182, 0.2);
}

.tsflt-filter-actions-flt7k3 .tsl-btn-primary:hover {
    background: linear-gradient(135deg, var(--tsflt-primary-light) 0%, var(--tsflt-primary) 100%);
    box-shadow: 0 4px 8px rgba(91, 33, 182, 0.3);
    transform: translateY(-1px);
}

.tsflt-filter-actions-flt7k3 .tsl-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(91, 33, 182, 0.2);
}

/* Secondary Button (Reset) */
.tsflt-filter-actions-flt7k3 .tsl-btn-secondary {
    background: white;
    color: var(--tsflt-gray-700);
    border: 1px solid var(--tsflt-gray-300);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tsflt-filter-actions-flt7k3 .tsl-btn-secondary:hover {
    background: var(--tsflt-gray-50);
    border-color: var(--tsflt-gray-400);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tsflt-filter-actions-flt7k3 .tsl-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ===========================
   Results Container
   =========================== */
.tsflt-results-flt7k3 {
    margin-bottom: 32px;
}

/* Grid for List View (Cards) */
.tsflt-results-flt7k3:has(.tsflt-card-flt7k3) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* Full width for Table View */
.tsflt-results-flt7k3:has(.tsflt-table-wrapper-flt7k3) {
    display: block;
}

/* ===========================
   Flight Card
   =========================== */
.tsflt-card-flt7k3 {
    background: white;
    border-radius: var(--tsflt-radius);
    box-shadow: var(--tsflt-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--tsflt-gray-200);
}

.tsflt-card-flt7k3:hover {
    transform: translateY(-4px);
    box-shadow: var(--tsflt-shadow-lg);
    border-color: var(--tsflt-primary);
}

.tsflt-card-image-flt7k3 {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--tsflt-gray-100);
}

.tsflt-card-image-flt7k3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    /* High Quality Image Rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.tsflt-card-flt7k3:hover .tsflt-card-image-flt7k3 img {
    transform: scale(1.05);
}

.tsflt-card-content-flt7k3 {
    padding: 20px;
}

/* Airline & Flight Code */
.tsflt-card-airline-flt7k3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tsflt-gray-100);
}

.tsflt-airline-name-flt7k3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tsflt-gray-900);
}

.tsflt-flight-code-flt7k3 {
    display: inline-block;
    padding: 4px 10px;
    background: var(--tsflt-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

/* Route Information */
.tsflt-card-route-flt7k3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--tsflt-gray-50);
    border-radius: var(--tsflt-radius);
}

.tsflt-route-item-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.tsflt-route-airport-flt7k3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tsflt-gray-900);
    margin-bottom: 4px;
}

.tsflt-route-time-flt7k3 {
    font-size: 12px;
    color: var(--tsflt-gray-600);
}

.tsflt-route-arrow-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
}

.tsflt-route-arrow-flt7k3 svg {
    width: 32px;
    height: 32px;
    color: var(--tsflt-primary);
}

.tsflt-route-duration-flt7k3 {
    font-size: 11px;
    color: var(--tsflt-gray-500);
    font-weight: 500;
}

/* Footer */
.tsflt-card-footer-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--tsflt-gray-100);
}

.tsflt-card-price-flt7k3 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tsflt-price-label-flt7k3 {
    font-size: 12px;
    color: var(--tsflt-gray-500);
    margin-bottom: 2px;
}

.tsflt-price-value-flt7k3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--tsflt-primary);
}

.tsflt-detail-btn-flt7k3 {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 14px;
}

.tsflt-detail-btn-flt7k3 .tsl-icon {
    width: 16px;
    height: 16px;
}

/* ===========================
   Skeleton Loading
   =========================== */
.tsflt-skeleton-wrapper-flt7k3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.tsflt-skeleton-card-flt7k3 {
    background: white;
    border-radius: var(--tsflt-radius);
    box-shadow: var(--tsflt-shadow);
    overflow: hidden;
    border: 1px solid var(--tsflt-gray-200);
}

.tsflt-skeleton-image-flt7k3 {
    width: 100%;
    height: 180px;
    background: linear-gradient(90deg,
            var(--tsflt-gray-200) 25%,
            var(--tsflt-gray-100) 50%,
            var(--tsflt-gray-200) 75%);
    background-size: 200% 100%;
    animation: tsflt-skeleton-loading-flt7k3 1.5s infinite;
}

.tsflt-skeleton-content-flt7k3 {
    padding: 20px;
}

.tsflt-skeleton-line-flt7k3 {
    height: 16px;
    background: linear-gradient(90deg,
            var(--tsflt-gray-200) 25%,
            var(--tsflt-gray-100) 50%,
            var(--tsflt-gray-200) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 12px;
    animation: tsflt-skeleton-loading-flt7k3 1.5s infinite;
}

@keyframes tsflt-skeleton-loading-flt7k3 {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {

    .tsflt-results-flt7k3,
    .tsflt-skeleton-wrapper-flt7k3 {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .tsflt-filter-row-flt7k3:not(:first-child) {
        flex-direction: column;
    }

    .tsflt-filter-group-flt7k3 {
        width: 100%;
        min-width: 100%;
    }

    .tsflt-filter-range-flt7k3 {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .tsflt-header-flt7k3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tsflt-title-flt7k3 {
        font-size: 24px;
    }

    .tsflt-view-switcher-flt7k3 {
        width: 100%;
    }

    .tsflt-view-btn-flt7k3 {
        flex: 1;
        justify-content: center;
    }

    /* Filters for mobile - stack search and buttons */
    .tsflt-filter-row-flt7k3:first-child {
        flex-direction: column;
        gap: 8px;
        flex-wrap: wrap;
    }

    .tsflt-filter-row-flt7k3:first-child .tsflt-filter-input-flt7k3 {
        border-radius: var(--tsflt-radius);
        border-right: 1px solid var(--tsflt-gray-300);
    }

    .tsflt-filter-row-flt7k3:first-child .tsflt-filter-input-flt7k3:focus {
        border-right: 1px solid var(--tsflt-primary);
    }

    .tsflt-filter-row-flt7k3:first-child .tsflt-filter-actions-flt7k3 {
        gap: 8px;
    }

    .tsflt-filter-row-flt7k3:first-child .tsl-btn-primary {
        border-radius: var(--tsflt-radius);
        border-right: none;
    }

    .tsflt-filter-row-flt7k3:first-child .tsl-btn-secondary {
        border-radius: var(--tsflt-radius);
        border-left: 1px solid var(--tsflt-gray-300);
    }

    .tsflt-filter-actions-flt7k3 {
        width: 100%;
        flex-direction: row;
    }

    .tsflt-filter-actions-flt7k3 .tsl-btn {
        flex: 1;
        justify-content: center;
    }

    .tsflt-results-flt7k3,
    .tsflt-skeleton-wrapper-flt7k3 {
        grid-template-columns: 1fr;
    }

    .tsflt-card-route-flt7k3 {
        padding: 12px;
    }

    .tsflt-route-airport-flt7k3 {
        font-size: 18px;
    }

    .tsflt-route-arrow-flt7k3 svg {
        width: 24px;
        height: 24px;
    }

    .tsflt-card-footer-flt7k3 {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .tsflt-detail-btn-flt7k3 {
        width: 100%;
        justify-content: center;
    }

    /* Table responsive */
    .tsflt-table-wrapper-flt7k3 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .tsflt-filters-flt7k3 {
        padding: 16px;
    }

    .tsflt-card-content-flt7k3 {
        padding: 16px;
    }

    .tsflt-route-time-flt7k3 {
        font-size: 10px;
    }

    .tsflt-filter-actions-flt7k3 {
        flex-direction: column;
    }

    .tsflt-filter-actions-flt7k3 .tsl-btn {
        width: 100%;
    }

    .tsflt-perpage-wrapper-flt7k3 {
        font-size: 13px;
    }
}

/* ===========================
   Accessibility Enhancements
   =========================== */
.tsflt-card-flt7k3:focus-within {
    outline: 2px solid var(--tsflt-primary);
    outline-offset: 2px;
}

.tsflt-detail-btn-flt7k3:focus {
    outline: 2px solid var(--tsflt-primary);
    outline-offset: 2px;
}

/* ===========================
   Per Page Selector
   =========================== */
.tsflt-perpage-wrapper-flt7k3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--tsflt-gray-700);
}

.tsflt-perpage-select-flt7k3 {
    padding: 6px 32px 6px 12px;
    border: 1px solid var(--tsflt-gray-300);
    border-radius: var(--tsflt-radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.tsflt-perpage-select-flt7k3:hover {
    border-color: var(--tsflt-primary);
}

.tsflt-perpage-select-flt7k3:focus {
    outline: none;
    border-color: var(--tsflt-primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

/* ===========================
   Table View
   =========================== */
.tsflt-table-wrapper-flt7k3 {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: var(--tsflt-radius);
    box-shadow: var(--tsflt-shadow);
    border: 1px solid var(--tsflt-gray-200);
}

.tsflt-table-flt7k3 {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.tsflt-table-flt7k3 thead {
    background: linear-gradient(to bottom, var(--tsflt-gray-50), #fafafa);
    border-bottom: 2px solid var(--tsflt-primary);
}

.tsflt-table-flt7k3 th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--tsflt-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--tsflt-gray-50);
    z-index: 10;
}

.tsflt-table-flt7k3 th:first-child {
    padding-left: 20px;
}

.tsflt-table-flt7k3 th:last-child {
    padding-right: 20px;
    text-align: center;
}

.tsflt-table-flt7k3 tbody tr {
    border-bottom: 1px solid var(--tsflt-gray-100);
    transition: all 0.2s ease;
}

.tsflt-table-flt7k3 tbody tr:hover {
    background-color: var(--tsflt-gray-50);
    box-shadow: inset 0 0 0 1px var(--tsflt-primary-light);
}

.tsflt-table-flt7k3 tbody tr:last-child {
    border-bottom: none;
}

.tsflt-table-flt7k3 td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--tsflt-gray-900);
    vertical-align: middle;
}

.tsflt-table-flt7k3 td:first-child {
    padding-left: 20px;
}

.tsflt-table-flt7k3 td:last-child {
    padding-right: 20px;
}

.tsflt-table-image-flt7k3 {
    width: 70px;
}

.tsflt-table-image-flt7k3 img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--tsflt-radius);
    box-shadow: var(--tsflt-shadow-sm);
}

.tsflt-table-code-flt7k3 {
    min-width: 150px;
}

.tsflt-table-code-wrapper-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tsflt-table-airline-flt7k3 {
    font-weight: 600;
    color: var(--tsflt-gray-900);
    font-size: 14px;
}

.tsflt-table-flight-code-flt7k3 {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--tsflt-primary), var(--tsflt-primary-dark));
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 14px;
    letter-spacing: 0.5px;
    width: fit-content;
    box-shadow: 0 1px 3px rgba(91, 33, 182, 0.3);
}

.tsflt-table-route-flt7k3 {
    min-width: 180px;
}

.tsflt-table-route-wrapper-flt7k3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--tsflt-gray-900);
}

.tsflt-table-duration-flt7k3 {
    font-size: 12px;
    color: var(--tsflt-gray-500);
    font-weight: 400;
    margin-top: 2px;
}

.tsflt-table-time-flt7k3 {
    min-width: 160px;
}

.tsflt-table-time-wrapper-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tsflt-table-time-wrapper-flt7k3>div:first-child {
    font-weight: 600;
    color: var(--tsflt-gray-900);
    font-size: 14px;
}

.tsflt-table-time-wrapper-flt7k3>div:last-child {
    font-size: 13px;
    color: var(--tsflt-gray-600);
}

.tsflt-table-price-flt7k3 {
    min-width: 120px;
}

.tsflt-table-price-value-flt7k3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--tsflt-primary);
}

.tsflt-table-actions-flt7k3 {
    white-space: nowrap;
    text-align: center;
    min-width: 140px;
}

.tsflt-table-actions-flt7k3 .tsl-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tsflt-table-actions-flt7k3 .tsl-btn-primary {
    background: linear-gradient(135deg, var(--tsflt-primary), var(--tsflt-primary-dark));
    color: white;
    border: none;
    border-radius: var(--tsflt-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(91, 33, 182, 0.2);
}

.tsflt-table-actions-flt7k3 .tsl-btn-primary:hover {
    background: linear-gradient(135deg, var(--tsflt-primary-light), var(--tsflt-primary));
    box-shadow: 0 4px 8px rgba(91, 33, 182, 0.3);
    transform: translateY(-1px);
}

.tsl-btn-sm {
    font-size: 13px;
    padding: 6px 14px;
}

/* ===========================
   Card Actions Layout (New Layout for Buttons)
   =========================== */

/* Card View Actions Container */
.tsflt-card-actions-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Inline buttons wrapper (รายละเอียด + จองตั๋ว) */
.tsflt-inline-buttons-flt7k3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ถ้ามีเพียงปุ่มเดียว (ไม่มีสิทธิ์จอง) ให้ขยายเต็ม */
.tsflt-inline-buttons-flt7k3:has(> :only-child) {
    grid-template-columns: 1fr;
}

/* Full width button (รายการจอง) */
.tsflt-full-width-btn-flt7k3 {
    width: 100%;
    justify-content: center;
}

/* Table View Actions Container */
.tsflt-table-actions-wrapper-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

/* Table inline buttons */
.tsflt-table-inline-buttons-flt7k3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* ถ้ามีเพียงปุ่มเดียว */
.tsflt-table-inline-buttons-flt7k3:has(> :only-child) {
    grid-template-columns: 1fr;
}

/* Table full width button */
.tsflt-table-full-width-btn-flt7k3 {
    width: 100%;
    justify-content: center;
}

/* Button improvements */
.tsflt-inline-buttons-flt7k3 .tsl-btn,
.tsflt-table-inline-buttons-flt7k3 .tsl-btn {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Success button style (จองตั๋ว) */
.tsl-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.tsl-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Icon in buttons */
.tsflt-inline-buttons-flt7k3 .tsl-icon,
.tsflt-table-inline-buttons-flt7k3 .tsl-icon {
    width: 16px;
    height: 16px;
}

/* Icon in full-width buttons (รายการจอง) - Smaller size */
.tsflt-full-width-btn-flt7k3 .tsl-icon,
.tsflt-table-full-width-btn-flt7k3 .tsl-icon,
.flight-bookings-btn .tsl-icon {
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tsflt-table-actions-wrapper-flt7k3 {
        min-width: 180px;
    }

    .tsflt-inline-buttons-flt7k3,
    .tsflt-table-inline-buttons-flt7k3 {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .tsflt-inline-buttons-flt7k3 {
        grid-template-columns: 1fr;
    }

    .tsflt-table-actions-wrapper-flt7k3 {
        min-width: 150px;
    }

    .tsflt-table-inline-buttons-flt7k3 .tsl-btn {
        font-size: 11px;
        padding: 4px 8px;
    }

    .tsflt-table-inline-buttons-flt7k3 .tsl-icon {
        width: 14px;
        height: 14px;
    }

    /* Icon in full-width buttons on mobile */
    .tsflt-full-width-btn-flt7k3 .tsl-icon,
    .tsflt-table-full-width-btn-flt7k3 .tsl-icon,
    .flight-bookings-btn .tsl-icon {
        width: 14px;
        height: 14px;
    }
}

/* ===========================
   Booking Status Badges - Simple
   =========================== */

/* Booking button layout */
.flight-bookings-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
}

.booking-btn-text {
    flex-shrink: 0;
}

/* Status badges container - simple */
.booking-status-badges-simple {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Individual badge - simple (no background) */
.booking-badge-simple {
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* Badge dot (circle) - simple */
.badge-dot-simple {
    display: inline-block !important;
    width: 8px;
    height: 8px;
    border-radius: 50% !important;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
    vertical-align: middle;
}

/* Badge number */
.badge-num {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

/* รอชำระเงิน - Yellow */
.badge-wait .badge-dot-simple {
    background-color: #f59e0b !important;
    border: 1px solid #f59e0b;
}

.badge-wait .badge-num {
    color: #92400e !important;
}

/* ชำระเงินแล้ว - Green */
.badge-paid .badge-dot-simple {
    background-color: #10b981 !important;
    border: 1px solid #10b981;
}

.badge-paid .badge-num {
    color: #065f46 !important;
}

/* ยกเลิก - Red */
.badge-cancelled .badge-dot-simple {
    background-color: #ef4444 !important;
    border: 1px solid #ef4444;
}

.badge-cancelled .badge-num {
    color: #991b1b !important;
}

/* จำนวน 0 - Gray (faded) */
.badge-zero .badge-dot-simple {
    background-color: #d1d5db !important;
    border: 1px solid #d1d5db;
}

.badge-zero .badge-num {
    color: #9ca3af !important;
}

/* Responsive adjustments - Mobile */
@media (max-width: 480px) {
    .booking-status-badges-simple {
        gap: 4px;
    }

    .booking-badge-simple {
        gap: 2px;
    }

    .badge-dot-simple {
        width: 6px;
        height: 6px;
    }

    .badge-num {
        font-size: 11px;
    }

    .flight-bookings-btn {
        gap: 6px;
        font-size: 12px;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {

    .tsflt-filters-flt7k3,
    .tsflt-detail-btn-flt7k3,
    .tsflt-perpage-wrapper-flt7k3,
    .tsflt-view-switcher-flt7k3,
    #tsflt-pagination-flt7k3 {
        display: none;
    }

    .tsflt-card-flt7k3 {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .tsflt-table-flt7k3 tbody tr {
        page-break-inside: avoid;
    }
}

/* ===========================
   Edit Functionality Styles
   =========================== */

/* Edit Icon Button (Floating on Card) */
.tsflt-edit-icon-flt7k3 {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    padding: 0;
}

.tsflt-edit-icon-flt7k3 svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.tsflt-edit-icon-flt7k3:hover {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.tsflt-edit-icon-flt7k3:hover svg {
    color: #ffffff;
}

.tsflt-edit-icon-flt7k3:active {
    transform: translateY(0);
}

/* Edit Button in Table View */
.tsflt-edit-btn-flt7k3 {
    margin-right: 8px;
}

.tsflt-edit-btn-flt7k3 svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* Delete Icon Button (Floating on Card) */
.tsflt-delete-icon-flt7k3 {
    position: absolute;
    top: 12px;
    right: 56px;
    /* Position next to edit button */
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    padding: 0;
}

.tsflt-delete-icon-flt7k3 svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.tsflt-delete-icon-flt7k3:hover {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.tsflt-delete-icon-flt7k3:hover svg {
    color: #ffffff;
}

.tsflt-delete-icon-flt7k3:active {
    transform: translateY(0);
}

/* Delete Button Styles */
.tsl-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
}

.tsl-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.tsl-btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Modal Overlay */
.tsflt-modal-overlay-flt7k3 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: tsflt-fadeIn-flt7k3 0.3s ease;
    overflow-y: auto;
}

/* Modal Content */
.tsflt-modal-content-flt7k3 {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: tsflt-slideUp-flt7k3 0.3s ease;
    margin: auto;
}

/* Modal Header */
.tsflt-modal-header-flt7k3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.tsflt-modal-header-flt7k3 h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.tsflt-modal-close-flt7k3 {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.tsflt-modal-close-flt7k3:hover {
    background: #f3f4f6;
}

.tsflt-modal-close-flt7k3 svg {
    color: #6b7280;
}

/* Modal Body (Form) */
.tsflt-modal-body-flt7k3 {
    padding: 28px;
}

/* Form Rows */
.tsflt-form-row-flt7k3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Form Group */
.tsflt-form-group-flt7k3 {
    display: flex;
    flex-direction: column;
}

.tsflt-form-group-flt7k3.tsflt-form-full-flt7k3 {
    grid-column: 1 / -1;
}

.tsflt-form-group-flt7k3 label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

/* Form Inputs */
.tsflt-form-input-flt7k3,
.tsflt-form-select-flt7k3,
.tsflt-form-textarea-flt7k3 {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.tsflt-form-input-flt7k3:focus,
.tsflt-form-select-flt7k3:focus,
.tsflt-form-textarea-flt7k3:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tsflt-form-textarea-flt7k3 {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Image Upload */
.tsflt-image-upload-wrapper-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tsflt-image-preview-flt7k3 {
    position: relative;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.tsflt-image-preview-flt7k3 img {
    width: 100%;
    height: auto;
    display: block;
}

.tsflt-image-remove-flt7k3 {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.95);
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.tsflt-image-remove-flt7k3:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.tsflt-image-remove-flt7k3 svg {
    color: #ffffff;
}

/* WordPress Editor Wrapper */
#wp-tsflt-edit-details-flt7k3-wrap {
    margin-top: 0;
}

/* Modal Footer */
.tsflt-modal-footer-flt7k3 {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-radius: 0 0 16px 16px;
}

/* Edit Message (Success/Error) */
.tsflt-edit-message-flt7k3 {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-edit-message-flt7k3.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.tsflt-edit-message-flt7k3.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Animations */
@keyframes tsflt-fadeIn-flt7k3 {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tsflt-slideUp-flt7k3 {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.tsflt-modal-save-flt7k3:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tsflt-modal-overlay-flt7k3 {
        padding: 0;
        align-items: flex-start;
    }

    .tsflt-modal-content-flt7k3 {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .tsflt-modal-header-flt7k3,
    .tsflt-modal-body-flt7k3,
    .tsflt-modal-footer-flt7k3 {
        padding: 20px;
    }

    .tsflt-modal-header-flt7k3 {
        border-radius: 0;
    }

    .tsflt-modal-footer-flt7k3 {
        border-radius: 0;
    }

    .tsflt-form-row-flt7k3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tsflt-modal-footer-flt7k3 {
        flex-direction: column-reverse;
    }

    .tsflt-modal-footer-flt7k3 .tsl-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tsflt-edit-icon-flt7k3 {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }

    .tsflt-edit-icon-flt7k3 svg {
        width: 16px;
        height: 16px;
    }

    .tsflt-modal-header-flt7k3 h3 {
        font-size: 18px;
    }

    .tsflt-form-group-flt7k3 label {
        font-size: 13px;
    }

    .tsflt-form-input-flt7k3,
    .tsflt-form-select-flt7k3,
    .tsflt-form-textarea-flt7k3 {
        font-size: 13px;
        padding: 9px 12px;
    }
}

/* ===========================
   Delete Confirmation Modal Styles
   =========================== */

/* Smaller modal for delete confirmation */
.tsflt-delete-modal-content-flt7k3 {
    max-width: 500px;
}

/* Warning Box */
.tsflt-delete-warning-box-flt7k3 {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tsflt-delete-warning-icon-flt7k3 {
    width: 24px;
    height: 24px;
    color: #dc2626;
    flex-shrink: 0;
}

.tsflt-delete-warning-text-flt7k3 {
    flex: 1;
}

.tsflt-delete-warning-title-flt7k3 {
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 4px 0;
    font-size: 14px;
}

.tsflt-delete-warning-desc-flt7k3 {
    color: #7f1d1d;
    margin: 0;
    font-size: 13px;
}

/* Flight Info Display */
.tsflt-delete-flight-info-flt7k3 {
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tsflt-delete-info-label-flt7k3 {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.tsflt-delete-info-value-flt7k3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Error Message */
.tsflt-delete-error-message-flt7k3 {
    padding: 10px 12px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #991b1b;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-delete-error-message-flt7k3::before {
    content: '⚠';
    font-size: 16px;
}

/* Delete Modal Footer - Improved Button Layout */
.tsflt-delete-modal-content-flt7k3 .tsflt-modal-footer-flt7k3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 28px;
}

.tsflt-delete-modal-content-flt7k3 .tsflt-modal-footer-flt7k3 .tsl-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-delete-modal-content-flt7k3 .tsl-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
    transition: all 0.2s ease;
}

.tsflt-delete-modal-content-flt7k3 .tsl-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tsflt-delete-modal-content-flt7k3 .tsl-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.tsflt-delete-modal-content-flt7k3 .tsl-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.tsflt-delete-modal-content-flt7k3 .tsl-btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Icon in buttons */
.tsflt-delete-modal-content-flt7k3 .tsl-btn .tsl-icon {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments for delete modal */
@media (max-width: 768px) {
    .tsflt-delete-modal-content-flt7k3 {
        max-width: 100%;
    }

    .tsflt-delete-warning-box-flt7k3 {
        flex-direction: column;
        align-items: flex-start;
    }

    .tsflt-delete-warning-icon-flt7k3 {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .tsflt-delete-icon-flt7k3 {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 48px;
    }

    .tsflt-delete-icon-flt7k3 svg {
        width: 16px;
        height: 16px;
    }

    /* Stack buttons vertically on mobile */
    .tsflt-delete-modal-content-flt7k3 .tsflt-modal-footer-flt7k3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tsflt-delete-modal-content-flt7k3 .tsflt-modal-footer-flt7k3 .tsl-btn {
        min-height: 44px;
        font-size: 14px;
    }
}

/* ===========================
   Flight Detail Modal Styles
   =========================== */

/* Body modifier when modal is open */
body.tsflt-detail-modal-open-flt7k3 {
    overflow: hidden;
}

/* Modal wrapper */
.tsflt-detail-modal-flt7k3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tsflt-fadeIn-flt7k3 0.2s ease-out;
}

/* Modal backdrop */
.tsflt-detail-modal-backdrop-flt7k3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Modal container */
.tsflt-detail-modal-container-flt7k3 {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    animation: tsflt-slideUp-flt7k3 0.3s ease-out;
    overflow: hidden;
}

/* Modal header */
.tsflt-detail-modal-header-flt7k3 {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--tsflt-primary) 0%, var(--tsflt-primary-dark) 100%);
}

.tsflt-detail-modal-header-flt7k3 h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tsflt-detail-modal-header-flt7k3 h3 svg {
    width: 24px;
    height: 24px;
}

.tsflt-detail-modal-close-flt7k3 {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsflt-detail-modal-close-flt7k3:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.tsflt-detail-modal-close-flt7k3 svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Modal body */
.tsflt-detail-modal-body-flt7k3 {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* Flight image in modal */
.tsflt-detail-image-flt7k3 {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--tsflt-gray-100);
}

.tsflt-detail-image-flt7k3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
}

/* Flight info section */
.tsflt-detail-info-flt7k3 {
    padding: 24px;
}

/* Flight header info */
.tsflt-detail-header-info-flt7k3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tsflt-gray-200);
}

.tsflt-detail-airline-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tsflt-detail-airline-name-flt7k3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tsflt-gray-900);
}

.tsflt-detail-flight-code-flt7k3 {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--tsflt-primary), var(--tsflt-primary-dark));
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    width: fit-content;
    letter-spacing: 0.5px;
}

.tsflt-detail-price-flt7k3 {
    text-align: right;
}

.tsflt-detail-price-label-flt7k3 {
    font-size: 13px;
    color: var(--tsflt-gray-500);
    margin-bottom: 4px;
}

.tsflt-detail-price-value-flt7k3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--tsflt-primary);
}

/* Route section in modal */
.tsflt-detail-route-flt7k3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--tsflt-gray-50), #ffffff);
    border-radius: 12px;
    border: 1px solid var(--tsflt-gray-200);
}

.tsflt-detail-route-item-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.tsflt-detail-route-airport-flt7k3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--tsflt-gray-900);
    margin-bottom: 6px;
}

.tsflt-detail-route-time-flt7k3 {
    font-size: 14px;
    color: var(--tsflt-gray-600);
    font-weight: 500;
}

.tsflt-detail-route-arrow-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
}

.tsflt-detail-route-arrow-flt7k3 svg {
    width: 40px;
    height: 40px;
    color: var(--tsflt-primary);
}

.tsflt-detail-route-duration-flt7k3 {
    font-size: 12px;
    color: var(--tsflt-gray-500);
    font-weight: 500;
    background: var(--tsflt-gray-100);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Flight details/description section */
.tsflt-detail-description-flt7k3 {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--tsflt-gray-200);
}

.tsflt-detail-description-title-flt7k3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tsflt-gray-900);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tsflt-detail-description-title-flt7k3 svg {
    width: 20px;
    height: 20px;
    color: var(--tsflt-primary);
}

.tsflt-detail-description-content-flt7k3 {
    font-size: 14px;
    line-height: 1.7;
    color: var(--tsflt-gray-700);
}

.tsflt-detail-description-content-flt7k3 p {
    margin: 0 0 12px;
}

.tsflt-detail-description-content-flt7k3 ul,
.tsflt-detail-description-content-flt7k3 ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.tsflt-detail-description-content-flt7k3 li {
    margin-bottom: 6px;
}

/* Modal footer */
.tsflt-detail-modal-footer-flt7k3 {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn .tsl-icon {
    width: 18px;
    height: 18px;
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn-secondary {
    background: white;
    color: var(--tsflt-gray-700);
    border: 1px solid var(--tsflt-gray-300);
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn-secondary:hover {
    background: var(--tsflt-gray-50);
    border-color: var(--tsflt-gray-400);
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.tsflt-detail-modal-footer-flt7k3 .tsl-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Loading state in modal */
.tsflt-detail-loading-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.tsflt-detail-loading-flt7k3 .tsflt-spinner-flt7k3 {
    width: 40px;
    height: 40px;
    border: 3px solid var(--tsflt-gray-200);
    border-top-color: var(--tsflt-primary);
    border-radius: 50%;
    animation: tsflt-spin-flt7k3 0.8s linear infinite;
}

@keyframes tsflt-spin-flt7k3 {
    to {
        transform: rotate(360deg);
    }
}

.tsflt-detail-loading-flt7k3 span {
    font-size: 14px;
    color: var(--tsflt-gray-600);
}

/* Error state */
.tsflt-detail-error-flt7k3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.tsflt-detail-error-flt7k3 svg {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.tsflt-detail-error-flt7k3 p {
    color: var(--tsflt-gray-600);
    font-size: 14px;
}

/* Responsive design for detail modal */
@media (max-width: 768px) {
    .tsflt-detail-modal-container-flt7k3 {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .tsflt-detail-image-flt7k3 {
        height: 200px;
    }

    .tsflt-detail-info-flt7k3 {
        padding: 20px;
    }

    .tsflt-detail-header-info-flt7k3 {
        flex-direction: column;
        gap: 16px;
    }

    .tsflt-detail-price-flt7k3 {
        text-align: left;
    }

    .tsflt-detail-route-flt7k3 {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .tsflt-detail-route-item-flt7k3 {
        width: 100%;
    }

    .tsflt-detail-route-arrow-flt7k3 {
        transform: rotate(90deg);
        padding: 10px 0;
    }

    .tsflt-detail-modal-footer-flt7k3 {
        flex-direction: column;
    }

    .tsflt-detail-modal-footer-flt7k3 .tsl-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tsflt-detail-modal-header-flt7k3 {
        padding: 16px 20px;
    }

    .tsflt-detail-modal-header-flt7k3 h3 {
        font-size: 1.1rem;
    }

    .tsflt-detail-airline-name-flt7k3 {
        font-size: 18px;
    }

    .tsflt-detail-route-airport-flt7k3 {
        font-size: 18px;
    }

    .tsflt-detail-price-value-flt7k3 {
        font-size: 20px;
    }

    .tsflt-detail-modal-footer-flt7k3 {
        padding: 16px 20px;
    }
}

/* ===========================
   Mobile Filter Styles
   ย้ายไปไฟล์ toursure-mobile-filter.css แล้ว
   =========================== */

/* ===========================
   Carousel View (view=2)
   Horizontal card like ts_flight_carousel
   =========================== */
.tsflt-carousel-grid-flt7k3 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tsflt-card-carousel-flt7k3 {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: var(--tsflt-radius);
    box-shadow: var(--tsflt-shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 100px;
}

.tsflt-card-carousel-flt7k3:hover {
    transform: translateY(-2px);
    box-shadow: var(--tsflt-shadow-lg);
}

/* Airline Badge (Left) */
.tsflt-carousel-badge-flt7k3 {
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tsflt-primary);
    color: white;
    min-width: 80px;
}

.tsflt-carousel-badge-code-flt7k3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Content (Center) */
.tsflt-carousel-content-flt7k3 {
    flex: 1;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.tsflt-carousel-airline-flt7k3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--tsflt-primary);
}

.tsflt-carousel-route-flt7k3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--tsflt-gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tsflt-carousel-origin-flt7k3,
.tsflt-carousel-dest-flt7k3 {
    letter-spacing: 0.5px;
}

.tsflt-carousel-arrow-flt7k3 {
    color: var(--tsflt-primary);
    display: flex;
    align-items: center;
}

.tsflt-carousel-arrow-flt7k3 svg {
    width: 20px;
    height: 20px;
}

.tsflt-carousel-period-flt7k3 {
    font-size: 13px;
    color: var(--tsflt-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tsflt-carousel-icon-flt7k3 {
    opacity: 0.7;
}

/* Action (Right) */
.tsflt-carousel-action-flt7k3 {
    flex: 0 0 auto;
    min-width: 150px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    border-left: 1px solid var(--tsflt-gray-200);
    background: var(--tsflt-gray-50);
}

.tsflt-carousel-price-flt7k3 {
    text-align: right;
}

.tsflt-carousel-price-label-flt7k3 {
    display: block;
    font-size: 12px;
    color: var(--tsflt-gray-400);
    margin-bottom: 2px;
}

.tsflt-carousel-price-value-flt7k3 {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--tsflt-primary);
}

.tsflt-carousel-cta-flt7k3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--tsflt-primary) 0%, var(--tsflt-primary-dark) 100%);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(91, 33, 182, 0.2);
}

.tsflt-carousel-cta-flt7k3:hover {
    background: linear-gradient(135deg, var(--tsflt-primary-light) 0%, var(--tsflt-primary) 100%);
    transform: translateX(2px);
    box-shadow: 0 4px 8px rgba(91, 33, 182, 0.3);
    color: white;
    text-decoration: none;
}

.tsflt-carousel-cta-arrow-flt7k3 {
    transition: transform 0.2s ease;
}

.tsflt-carousel-cta-flt7k3:hover .tsflt-carousel-cta-arrow-flt7k3 {
    transform: translateX(3px);
}

/* Carousel View - Responsive */
@media (max-width: 768px) {
    .tsflt-card-carousel-flt7k3 {
        flex-direction: column;
    }

    .tsflt-carousel-badge-flt7k3 {
        flex: 0 0 auto;
        min-height: 60px;
        width: 100%;
        min-width: auto;
    }

    .tsflt-carousel-content-flt7k3 {
        padding: 16px 20px;
    }

    .tsflt-carousel-route-flt7k3 {
        font-size: 20px;
    }

    .tsflt-carousel-action-flt7k3 {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-left: none;
        border-top: 1px solid var(--tsflt-gray-200);
        width: 100%;
        min-width: auto;
        padding: 16px 20px;
    }

    .tsflt-carousel-price-flt7k3 {
        text-align: left;
    }

    .tsflt-carousel-price-value-flt7k3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tsflt-carousel-content-flt7k3 {
        padding: 12px 16px;
    }

    .tsflt-carousel-route-flt7k3 {
        font-size: 18px;
        gap: 6px;
    }

    .tsflt-carousel-action-flt7k3 {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .tsflt-carousel-price-flt7k3 {
        text-align: center;
        width: 100%;
    }

    .tsflt-carousel-cta-flt7k3 {
        width: 100%;
        justify-content: center;
    }
}

/* Carousel View - Skeleton Loading */
.tsflt-card-carousel-flt7k3.tsflt-skeleton-flt7k3 {
    pointer-events: none;
}

.tsflt-card-carousel-flt7k3.tsflt-skeleton-flt7k3 .tsflt-carousel-badge-flt7k3 {
    background: var(--tsflt-gray-200);
    animation: tsflt-skeleton-pulse 1.5s ease-in-out infinite;
}

.tsflt-card-carousel-flt7k3.tsflt-skeleton-flt7k3 .tsflt-skeleton-line-flt7k3 {
    height: 16px;
    background: var(--tsflt-gray-200);
    border-radius: 4px;
    animation: tsflt-skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes tsflt-skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
