/**
 * Tobalt Hall List
 * Split layout cards with accessible colors
 *
 * Color Contrast Ratios (WCAG AAA = 7:1):
 * - Primary text (#1e3a5f) on white: 12.6:1 ✓
 * - Secondary text (#475569) on white: 7.1:1 ✓
 * - Price text (#1e40af) on white: 8.5:1 ✓
 *
 * Author: Tobalt — https://tobalt.lt
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --tobalt-blue-900: #1e3a5f;
    --tobalt-blue-700: #1e40af;
    --tobalt-blue-600: #2563eb;
    --tobalt-blue-500: #3b82f6;
    --tobalt-blue-100: #dbeafe;
    --tobalt-blue-50: #eff6ff;
    --tobalt-slate-700: #334155;
    --tobalt-slate-600: #475569;
    --tobalt-slate-500: #64748b;
    --tobalt-slate-400: #94a3b8;
    --tobalt-slate-200: #e2e8f0;
    --tobalt-slate-100: #f1f5f9;
    --tobalt-slate-50: #f8fafc;
    --tobalt-white: #ffffff;
    --tobalt-radius: 8px;
    --tobalt-radius-lg: 12px;
    --tobalt-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --tobalt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --tobalt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Hall List Wrapper
   ======================================== */
.tobalt-hall-list-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ========================================
   Search and Filter Form
   ======================================== */
.tobalt-hall-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--tobalt-slate-50);
    border: 1px solid var(--tobalt-slate-200);
    border-radius: var(--tobalt-radius-lg);
}

.tobalt-search-field {
    flex: 1;
    min-width: 200px;
}

.tobalt-search-field input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--tobalt-blue-900);
    background: var(--tobalt-white);
    border: 1px solid var(--tobalt-slate-200);
    border-radius: var(--tobalt-radius);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tobalt-search-field input::placeholder {
    color: var(--tobalt-slate-500);
}

.tobalt-search-field input:focus {
    outline: none;
    border-color: var(--tobalt-blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tobalt-filter-fields {
    display: flex;
    gap: 12px;
}

.tobalt-filter-fields select {
    padding: 12px 16px;
    font-size: 16px;
    color: var(--tobalt-blue-900);
    background: var(--tobalt-white);
    border: 1px solid var(--tobalt-slate-200);
    border-radius: var(--tobalt-radius);
    cursor: pointer;
    transition: border-color 150ms ease;
}

.tobalt-filter-fields select:focus {
    outline: none;
    border-color: var(--tobalt-blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tobalt-search-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tobalt-white);
    background: var(--tobalt-blue-600);
    border: none;
    border-radius: var(--tobalt-radius);
    cursor: pointer;
    transition: background-color 150ms ease;
    min-height: 48px;
}

.tobalt-search-button:hover {
    background: var(--tobalt-blue-700);
}

.tobalt-search-button:focus {
    outline: 2px solid var(--tobalt-blue-600);
    outline-offset: 2px;
}

/* ========================================
   Hall Grid
   ======================================== */
.tobalt-hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* ========================================
   Hall Card - Split Layout
   ======================================== */
.tobalt-hall-card {
    display: flex;
    flex-direction: row;
    background: var(--tobalt-white);
    border: 1px solid var(--tobalt-slate-200);
    border-radius: var(--tobalt-radius-lg);
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    min-height: 220px;
}

.tobalt-hall-card:hover {
    border-color: var(--tobalt-blue-500);
    box-shadow: var(--tobalt-shadow-lg);
}

.tobalt-hall-card:focus-within {
    outline: 2px solid var(--tobalt-blue-500);
    outline-offset: 2px;
}

/* ========================================
   Image Wrapper - Left Side (40%)
   ======================================== */
.tobalt-hall-image-wrapper {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tobalt-blue-100) 0%, var(--tobalt-slate-100) 100%);
}

.tobalt-hall-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.tobalt-hall-card:hover .tobalt-hall-image {
    transform: scale(1.05);
}

/* ========================================
   Hall Content - Right Side (60%)
   ======================================== */
.tobalt-hall-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    min-width: 0;
}

/* ========================================
   Hall Header
   ======================================== */
.tobalt-hall-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tobalt-hall-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tobalt-blue-900);
    margin: 0;
    line-height: 1.3;
}

/* ========================================
   Price Display
   ======================================== */
.tobalt-hall-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.tobalt-hall-price strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--tobalt-blue-700);
}

.tobalt-price-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--tobalt-slate-600);
}

.tobalt-price-free {
    font-size: 14px;
    font-weight: 600;
    color: var(--tobalt-white);
    background: #059669;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========================================
   Hall Metadata
   ======================================== */
.tobalt-hall-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tobalt-slate-200);
}

.tobalt-hall-capacity,
.tobalt-hall-area {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tobalt-slate-600);
}

.tobalt-hall-capacity svg,
.tobalt-hall-area svg {
    width: 18px;
    height: 18px;
    color: var(--tobalt-slate-500);
    flex-shrink: 0;
}

/* ========================================
   Features
   ======================================== */
.tobalt-hall-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: auto;
    padding-bottom: 16px;
}

.tobalt-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--tobalt-blue-700);
    background: var(--tobalt-blue-50);
    border: 1px solid var(--tobalt-blue-100);
    border-radius: 20px;
}

.tobalt-feature-more {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tobalt-slate-600);
    background: var(--tobalt-slate-100);
    border-radius: 20px;
}

/* ========================================
   Button
   ======================================== */
.tobalt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--tobalt-white);
    background: var(--tobalt-blue-600);
    border: none;
    border-radius: var(--tobalt-radius);
    cursor: pointer;
    transition: background-color 150ms ease;
    min-height: 48px;
    margin-top: auto;
}

.tobalt-button:hover {
    background: var(--tobalt-blue-700);
    color: var(--tobalt-white);
}

.tobalt-button:focus {
    outline: 2px solid var(--tobalt-blue-600);
    outline-offset: 2px;
}

.tobalt-button:active {
    background: var(--tobalt-blue-900);
}

/* ========================================
   Pagination
   ======================================== */
.tobalt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 24px 0;
}

.tobalt-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--tobalt-slate-700);
    background: var(--tobalt-white);
    border: 1px solid var(--tobalt-slate-200);
    border-radius: var(--tobalt-radius);
    transition: all 150ms ease;
}

.tobalt-pagination .page-numbers:hover {
    background: var(--tobalt-blue-50);
    border-color: var(--tobalt-blue-500);
    color: var(--tobalt-blue-700);
}

.tobalt-pagination .page-numbers.current {
    color: var(--tobalt-white);
    background: var(--tobalt-blue-600);
    border-color: var(--tobalt-blue-600);
}

.tobalt-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: var(--tobalt-slate-500);
}

/* ========================================
   No Results / Empty State
   ======================================== */
.tobalt-no-results {
    text-align: center;
    padding: 48px 24px;
    font-size: 16px;
    color: var(--tobalt-slate-600);
}

.tobalt-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--tobalt-slate-600);
}

.tobalt-empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--tobalt-slate-400);
}

/* ========================================
   Loading State
   ======================================== */
.tobalt-hall-list-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tobalt-loading-spinner {
    text-align: center;
    padding: 48px;
    color: var(--tobalt-slate-600);
}

/* ========================================
   Responsive - Tablet (768px)
   ======================================== */
@media (max-width: 768px) {
    .tobalt-hall-list-wrapper {
        padding: 16px;
    }

    .tobalt-hall-search-form {
        flex-direction: column;
        padding: 16px;
    }

    .tobalt-search-field {
        width: 100%;
        min-width: unset;
    }

    .tobalt-filter-fields {
        flex-direction: column;
        width: 100%;
    }

    .tobalt-filter-fields select {
        width: 100%;
    }

    .tobalt-search-button {
        width: 100%;
    }

    .tobalt-hall-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Stack card vertically on tablet */
    .tobalt-hall-card {
        flex-direction: column;
        min-height: auto;
    }

    .tobalt-hall-image-wrapper {
        flex: none;
        max-width: 100%;
        height: 200px;
    }

    .tobalt-hall-content {
        padding: 20px;
    }

    .tobalt-pagination {
        flex-wrap: wrap;
    }
}

/* ========================================
   Responsive - Mobile (480px)
   ======================================== */
@media (max-width: 480px) {
    .tobalt-hall-image-wrapper {
        height: 180px;
    }

    .tobalt-hall-content {
        padding: 16px;
    }

    .tobalt-hall-header {
        flex-direction: column;
        gap: 8px;
    }

    .tobalt-hall-title {
        font-size: 17px;
    }

    .tobalt-hall-meta {
        gap: 12px;
    }

    .tobalt-hall-capacity,
    .tobalt-hall-area {
        font-size: 13px;
    }

    .tobalt-button {
        padding: 14px 20px;
    }
}

/* ========================================
   High Contrast Mode Support
   ======================================== */
@media (prefers-contrast: high) {
    .tobalt-hall-card {
        border-width: 2px;
    }

    .tobalt-hall-title {
        color: #000000;
    }

    .tobalt-button {
        border: 2px solid transparent;
    }

    .tobalt-button:focus {
        outline-width: 3px;
    }
}

/* ========================================
   Reduced Motion Support
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .tobalt-hall-card,
    .tobalt-hall-image,
    .tobalt-button,
    .tobalt-search-field input,
    .tobalt-filter-fields select {
        transition: none;
    }

    .tobalt-hall-card:hover .tobalt-hall-image {
        transform: none;
    }
}
