/**
 * Ticket Marketplace Styles - Shared across all ticket pages
 * 
 * Included by: main.jsp, edit_ad.jsp, view_ads.jsp, view_my_ads.jsp
 * 
 * This file uses JSP to inject site-specific colors. It should be served
 * through a JSP that sets the correct content-type, or the CSS variables
 * should be defined inline in each page that includes this file.
 * 
 * Organization:
 * 1. CSS Variables (Light Mode)
 * 2. Container & Layout
 * 3. Hero Sections
 * 4. Alert/Warning Boxes
 * 5. Buttons
 * 6. Filter Bar
 * 7. Listing Cards
 * 8. Pagination
 * 9. Disclaimer
 * 10. Animations
 * 11. Responsive Breakpoints
 * 12. Dark Mode Overrides
 */


/* ==========================================================================
   1. CSS VARIABLES - Ticket Marketplace Theme
   
   NOTE: These use CSS color-mix() which requires the --tk-primary-hex and
   --tk-secondary-hex to be set via inline style or JSP on each page.
   Example: <style>:root { --tk-primary-hex: #F56600; --tk-secondary-hex: #522D80; }</style>
   ========================================================================== */

:root {
    /* Base colors - set these per-site via inline style */
    --tk-primary: var(--site-primary, #F56600);
    --tk-secondary: var(--site-secondary, #522D80);
    
    /* Derived colors using color-mix */
    --tk-primary-light: color-mix(in srgb, var(--tk-primary) 80%, white);
    --tk-primary-dark: color-mix(in srgb, var(--tk-primary) 80%, black);
    --tk-secondary-light: color-mix(in srgb, var(--tk-secondary) 80%, white);
    --tk-secondary-dark: color-mix(in srgb, var(--tk-secondary) 70%, black);
    
    /* Neutrals */
    --tk-white: #ffffff;
    /* Text on tk-secondary (purple) backgrounds - overridden in dark mode to stay #fff */
    --tk-text-on-secondary: #ffffff;
    --tk-gray-50: #fafafa;
    --tk-gray-100: #f5f5f5;
    --tk-gray-200: #eeeeee;
    --tk-gray-300: #e0e0e0;
    --tk-gray-400: #bdbdbd;
    --tk-gray-600: #757575;
    --tk-gray-800: #424242;
    
    /* Semantic */
    --tk-danger: #dc3545;
    --tk-success: #28a745;
    --tk-warning-bg: #fff3cd;
    --tk-warning-border: #ffc107;
    --tk-warning-text: #856404;
    
    /* Effects */
    --tk-shadow-sm: 0 2px 4px var(--shadow-color);
    --tk-shadow-md: 0 4px 12px var(--shadow-color-md);
    --tk-shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --tk-radius-sm: 8px;
    --tk-radius-md: 12px;
    --tk-radius-lg: 16px;
    --tk-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   2. CONTAINER & LAYOUT
   ========================================================================== */

.tk-marketplace {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}


/* ==========================================================================
   3. HERO SECTIONS
   ========================================================================== */

.tk-hero {
    background: linear-gradient(135deg, var(--tk-secondary) 0%, var(--tk-secondary-dark) 50%, color-mix(in srgb, var(--tk-secondary) 40%, black) 100%);
    border-radius: var(--tk-radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: tk-fadeSlideUp 0.6s ease-out;
}

.tk-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, color-mix(in srgb, var(--tk-primary) 15%, transparent) 0%, transparent 70%);
    pointer-events: none;
}

.tk-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--tk-text-on-secondary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tk-hero-title .material-icons {
    font-size: 32px;
    color: var(--tk-primary);
}

.tk-hero-text {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin: 0;
    max-width: 700px;
}

.tk-hero-text a {
    color: var(--tk-primary-light);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--tk-transition);
}

.tk-hero-text a:hover,
.tk-hero-text a:focus {
    color: var(--tk-primary);
    text-decoration: underline;
}


/* ==========================================================================
   4. ALERT / WARNING BOXES
   ========================================================================== */

.tk-alert {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tk-secondary) 8%, #1a1a1a) 0%, color-mix(in srgb, var(--tk-secondary) 12%, #0f0f0f) 100%);
    border: var(--tk-alert-border);
    border-left: 4px solid var(--tk-primary);
    border-radius: var(--tk-radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    animation: tk-fadeSlideUp 0.6s ease-out 0.1s backwards;
}

.tk-alert-icon {
    font-size: 32px;
    flex-shrink: 0;
    color: var(--tk-primary);
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Alert action links */
.tk-alert-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.tk-alert-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tk-primary) !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tk-alert-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--tk-primary);
}

.tk-alert-link .material-icons {
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
}

.tk-alert-content {
    flex: 1;
}

.tk-alert-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tk-primary);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tk-alert-text {
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
}

/* Inline warning (simpler style for within content) */
.tk-warning-inline {
    color: var(--tk-danger);
    font-weight: bold;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}


/* ==========================================================================
   5. BUTTONS
   ========================================================================== */

.tk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--tk-transition);
    border: none;
}

.tk-btn-primary {
    background: linear-gradient(135deg, var(--tk-primary) 0%, var(--tk-primary-dark) 100%);
    color: var(--color-text-on-primary) !important;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--tk-primary) 35%, transparent);
    text-decoration: none !important;
}

.tk-btn-primary .material-icons {
    color: var(--color-text-on-primary) !important;
}

.tk-btn-primary:hover,
.tk-btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--tk-primary) 45%, transparent);
    color: var(--color-text-on-primary) !important;
    text-decoration: none !important;
}

.tk-btn-secondary {
    background: var(--tk-white);
    color: var(--tk-secondary);
    border: 2px solid var(--tk-primary);
}

.tk-btn-secondary .material-icons {
    color: inherit;
}

.tk-btn-secondary:hover,
.tk-btn-secondary:focus {
    background: var(--tk-primary);
    color: var(--color-text-on-primary);
}

.tk-btn-secondary:hover .material-icons,
.tk-btn-secondary:focus .material-icons {
    color: var(--color-text-on-primary);
}

.tk-btn .material-icons {
    font-size: 20px;
}

/* Small button variant */
.tk-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.tk-btn-sm .material-icons {
    font-size: 18px;
}


/* ==========================================================================
   6. FILTER BAR
   ========================================================================== */

.tk-filter-bar {
    background-color: var(--tk-gray-100);
    border: 1px dotted var(--tk-gray-300);
    border-radius: var(--tk-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.tk-filter-bar label {
    color: var(--tk-gray-600);
    margin-right: 4px;
}

.tk-filter-bar select {
    height: 32px;
    padding: 4px 8px;
    border: 1px solid var(--tk-gray-300);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: var(--tk-white);
    color: var(--color-text);
    cursor: pointer;
}

.tk-filter-bar select:focus {
    outline: none;
    border-color: var(--tk-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tk-primary) 20%, transparent);
}

/* Sort label with tooltip indicator */
.tk-sort-label {
    cursor: help;
    position: relative;
    border-bottom: 1px dotted var(--tk-gray-600);
}


/* ==========================================================================
   7. LISTING CARDS
   ========================================================================== */

.tk-listing {
    border: 1px solid var(--tk-gray-300);
    border-radius: var(--tk-radius-sm);
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    background-color: var(--tk-gray-100);
    transition: box-shadow var(--tk-transition), border-color var(--tk-transition);
}

.tk-listing:hover {
    box-shadow: var(--tk-shadow-sm);
    border-color: var(--tk-gray-400);
}

.tk-listing-header {
    background-color: var(--tk-gray-300);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: var(--tk-radius-sm) var(--tk-radius-sm) 0 0;
}

.tk-listing-row {
    padding: 6px 12px;
    border-bottom: 1px solid var(--tk-gray-200);
}

.tk-listing-row:last-child {
    border-bottom: none;
}

.tk-listing-label {
    font-weight: 700;
    color: var(--tk-gray-800);
    margin-right: 6px;
}

.tk-listing-value {
    color: var(--tk-gray-800);
}

.tk-listing-text {
    line-height: 1.5;
    padding: 10px 12px;
}

/* Username in listing */
.tk-listing-username {
    font-family: Tahoma, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--tk-secondary);
    text-decoration: none;
}

.tk-listing-username:hover {
    text-decoration: underline;
}

/* Donor/Premium Ad Styling */
.tk-listing--donor {
    border-color: var(--tk-primary);
}

.tk-listing--donor .tk-listing-header {
    background-color: var(--tk-primary);
    color: var(--color-text-on-primary);
}

.tk-listing--donor .tk-listing-username {
    color: var(--color-text-on-primary) !important;
}

.tk-listing--donor .tk-listing-header .material-icons {
    color: var(--color-text-on-primary) !important;
}

/* Donor badge */
.tk-donor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 13px;
    color: var(--color-text-on-primary);
}

.tk-donor-badge img {
    height: 35px;
    border-radius: 2px;
}

/* Certified Seller Badge */
.tk-certified-seller {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    background-color: var(--tk-white);
    color: var(--tk-primary);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: help;
}

/* New member warning */
.tk-new-member-warning {
    background-color: var(--tk-danger);
    color: var(--tk-white);
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
}

.tk-new-member-warning a {
    color: var(--tk-white) !important;
    text-decoration: underline;
    font-weight: 600;
}

/* Contact button */
.tk-contact-btn {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--tk-white);
    border: 1px solid var(--tk-gray-300);
    border-radius: 4px;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--tk-transition);
}

.tk-contact-btn:hover {
    background: var(--tk-primary);
    color: var(--color-text-on-primary);
    border-color: var(--tk-primary);
}


/* ==========================================================================
   8. PAGINATION
   ========================================================================== */

.tk-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px 0;
}

.tk-pagination a,
.tk-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--tk-gray-300);
    background: var(--tk-white);
    color: var(--tk-secondary);
    transition: all var(--tk-transition);
}

.tk-pagination a:hover {
    background: var(--tk-gray-100);
    border-color: var(--tk-primary);
    color: var(--tk-primary);
    text-decoration: none;
}

.tk-pagination .active {
    background: var(--tk-primary) !important;
    border-color: var(--tk-primary) !important;
    color: var(--color-text-on-primary) !important;
}

.tk-pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Bootstrap pagination overrides for legacy compatibility */
ul.pagination.bootpag {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 0;
    margin: 16px 0;
    list-style: none;
}

ul.pagination.bootpag li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--tk-gray-300);
    background: var(--tk-white);
    color: var(--tk-secondary);
    transition: all var(--tk-transition);
}

ul.pagination.bootpag li a:hover {
    background: var(--tk-gray-100);
    border-color: var(--tk-primary);
    color: var(--tk-primary);
}

ul.pagination.bootpag li.active a,
ul.pagination.bootpag li.active a:hover,
ul.pagination.bootpag li.active a:focus {
    background-color: var(--tk-primary) !important;
    border-color: var(--tk-primary) !important;
    color: var(--color-text-on-primary) !important;
}

ul.pagination.bootpag li.disabled a {
    opacity: 0.5;
    pointer-events: none;
    color: var(--tk-gray-400) !important;
}

/* Tmail-style Pager Footer Bar */
.tk-pager-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 14px;
    background: var(--tk-primary);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 35%, rgba(0, 0, 0, 0.10) 100%);
    color: var(--color-text-on-primary);
    font-size: 14px;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

.tk-pager-info {
    font-weight: 500;
    color: var(--color-text-on-primary);
}

.tk-pager-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.tk-pager-btn {
    padding: 6px 12px;
    min-width: 36px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-text-on-primary) !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tk-pager-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--color-text-on-primary) !important;
    text-decoration: none !important;
}

.tk-pager-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.tk-pager-active {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 700;
}

@media (max-width: 640px) {
    .tk-pager-bar {
        justify-content: center;
        text-align: center;
    }
    
    .tk-pager-info {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .tk-pager-btn {
        padding: 5px 8px;
        min-width: 32px;
        font-size: 12px;
    }
}


/* ==========================================================================
   9. DISCLAIMER
   ========================================================================== */

.tk-disclaimer {
    background: var(--tk-gray-100);
    border: 1px solid transparent;
    border-radius: var(--tk-radius-md);
    padding: 20px 24px;
    margin-top: auto;
    margin-bottom: 16px;
}

.tk-disclaimer-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--tk-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px 0;
}

.tk-disclaimer-text {
    font-size: 13px;
    color: var(--tk-gray-600);
    line-height: 1.6;
    margin: 0;
}


/* ==========================================================================
   10. ANIMATIONS
   ========================================================================== */

@keyframes tk-fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
    .tk-hero {
        padding: 24px;
    }
    
    .tk-hero-title {
        font-size: 24px;
    }
    
    .tk-hero-title .material-icons {
        font-size: 28px;
    }
    
    .tk-alert {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .tk-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .tk-filter-bar select {
        width: 100%;
    }
    
    .tk-listing-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tk-donor-badge,
    .tk-certified-seller {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 640px) {
    .layout_body {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
    
    .tk-marketplace {
        padding: 0 8px;
    }
    
    .tk-hero {
        padding: 20px;
        border-radius: var(--tk-radius-sm);
    }
    
    .tk-hero-title {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tk-hero-text {
        font-size: 14px;
    }
    
    .tk-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tk-listing {
        margin: 8px 0;
        font-size: 14px;
    }
    
    .tk-listing-header {
        padding: 8px 10px;
    }
    
    .tk-listing-row {
        padding: 6px 10px;
    }
    
    .tk-listing-username {
        font-size: 16px;
    }
    
    ul.pagination.bootpag li a {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}


/* ==========================================================================
   12. DARK MODE - High-contrast text on purple hero & category headers
   ========================================================================== */

html.dark-mode .tk-hero-title,
html.dark-mode .tk-hero-text {
    color: var(--tk-text-on-secondary) !important;
}

html.dark-mode .tk-hero-title .material-icons {
    color: var(--tk-primary-light) !important;
}

html.dark-mode .tk-category-header .tk-category-name {
    color: var(--tk-text-on-secondary) !important;
}

html.dark-mode .tk-category-header .tk-category-name .material-icons {
    color: var(--tk-primary-light) !important;
}

html.dark-mode .tk-category-header .tk-count-badge {
    color: #fff !important;
}


/* ==========================================================================
   13. VIEW BAR - Tmail-style gradient header bar
   ========================================================================== */

.tk-view-bar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 14px 12px;
    box-sizing: border-box;
    background: var(--tk-primary);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 35%, rgba(0, 0, 0, 0.10) 100%);
    border-radius: 8px 8px 0 0;
    color: var(--color-text-on-primary);
    margin-top: 10px;
}

.tk-view-bar .material-icons {
    color: var(--color-text-on-primary) !important;
}

/* Each row in the view bar */
.tk-view-bar__row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* Actions row - Post Ad left, other actions right */
.tk-view-bar__row--actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.tk-view-bar__actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-view-bar__actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tk-view-bar__icon {
    font-size: 28px;
    line-height: 1;
    color: var(--color-text-on-primary);
    width: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tk-view-bar__title {
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.25;
}

.tk-view-bar__breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
}

.tk-view-bar__breadcrumb a {
    color: var(--color-text-on-primary) !important;
    text-decoration: none !important;
}

.tk-view-bar__breadcrumb a:hover {
    text-decoration: underline !important;
}

.tk-view-bar__sep {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    user-select: none;
    flex-shrink: 0;
}

.tk-view-bar__count {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 14px;
}

.tk-view-bar__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-on-primary) !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tk-view-bar__action:hover,
.tk-view-bar__action:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--color-text-on-primary) !important;
    text-decoration: none !important;
}

.tk-view-bar__action--primary {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
}

.tk-view-bar__action--primary:hover {
    background: rgba(255, 255, 255, 0.38);
}

.tk-view-bar__action .material-icons {
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125em;
}


/* ==========================================================================
   14. COMPACT FILTER BAR - Tmail-style list actions
   ========================================================================== */

.tk-list-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 14px;
    background: var(--color-bg-hover);
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    min-height: 40px;
}

.tk-list-actions label {
    color: var(--tk-gray-600);
    font-weight: 500;
    margin-right: 4px;
}

/* Native select styling - must be explicit to prevent issues */
.tk-list-actions select:not([multiple]) {
    height: 32px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-bg-elevated);
    color: var(--color-text);
    cursor: pointer;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
}

.tk-list-actions select:not([multiple]):focus {
    outline: none;
    border-color: var(--tk-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tk-primary) 20%, transparent);
}

/* Ensure options don't display outside select */
.tk-list-actions select option {
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
}

.tk-list-actions__group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tk-list-actions__sep {
    color: var(--color-border);
    user-select: none;
}

/* Sort label tooltip */
.tk-list-actions .tk-sort-tip {
    cursor: help;
    position: relative;
    border-bottom: 1px dotted var(--tk-gray-600);
}

.tk-list-actions .tk-sort-tip:hover::after {
    content: 'Certified Seller > Annual Ultimate > Annual Premium > Monthly Ultimate > Monthly Premium + number of years';
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 320px;
    background-color: #333;
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.4;
    z-index: 1000;
    box-shadow: var(--tk-shadow-md);
}

/* Subtypes/sections row */
.tk-list-actions--sections {
    border-bottom: none;
    padding-top: 8px;
    padding-bottom: 12px;
    background: var(--color-bg-hover);
    position: relative;
}

/* CRITICAL: Hide native multi-select completely */
.tk-list-actions--sections select,
.tk-list-actions--sections select[multiple] {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
}

.tk-list-actions--sections .chosen-container {
    min-width: 200px;
    width: 100% !important;
    display: block !important;
}

.tk-list-actions--sections .chosen-container-multi .chosen-choices {
    min-height: 32px;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
}

/* Ensure Chosen dropdown is hidden until clicked */
.tk-list-actions--sections .chosen-container .chosen-drop {
    position: absolute;
    left: -9999px;
    z-index: 1010;
}

.tk-list-actions--sections .chosen-container.chosen-with-drop .chosen-drop {
    left: 0;
}

/* Style the dropdown results */
.tk-list-actions--sections .chosen-container .chosen-results {
    max-height: 240px;
    overflow-y: auto;
}

.tk-list-actions--sections .chosen-container .chosen-results li {
    padding: 6px 10px;
    font-size: 13px;
}


/* ==========================================================================
   15. RESPONSIVE - View bar and list actions
   ========================================================================== */

@media (max-width: 768px) {
    .tk-view-bar {
        padding: 10px 12px;
        gap: 10px;
    }
    
    /* Keep all header buttons (Post Ad, watch, My Ads) in one row on mobile */
    .tk-view-bar__row--actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .tk-view-bar__actions-left,
    .tk-view-bar__actions-right {
        justify-content: flex-start;
    }
    
    .tk-view-bar__action {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .tk-list-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .tk-list-actions__group {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .tk-list-actions select:not([multiple]) {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .tk-view-bar__breadcrumb {
        font-size: 14px;
    }
    
    .tk-view-bar__icon {
        font-size: 24px;
        width: 24px;
    }
    
    .tk-view-bar__action span:not(.material-icons) {
        display: none;
    }
    
    .tk-view-bar__action {
        padding: 8px;
    }
}



