/* =====================================================
   Account Selector Page
   ===================================================== */

/* Alpine.js */
[x-cloak] { display: none !important; }

/* ── Body / Layout ─────────────────────────────────── */
.selector-body {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ─────────────────────────────────────────── */
.selector-header {
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.selector-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selector-header-logo {
    height: 36px;
    width: auto;
}


/* ── Footer ─────────────────────────────────────────── */
.selector-footer {
    background: #fff;
    border-top: 1px solid #e8ecf0;
    padding: 16px 24px;
    text-align: center;
    margin-top: auto;
}

.selector-footer p {
    margin: 0;
    font-size: 13px;
    color: #8a94a6;
}

/* ── Main wrapper ────────────────────────────────────── */
.account-selector-page {
    flex: 1;
}

/* ── Hero ────────────────────────────────────────────── */
.selector-hero {
    background: #00174b;
    padding: 64px 24px 56px;
    text-align: center;
    color: #fff;
}

.selector-hero-content {
    max-width: 640px;
    margin: 0 auto;
}

.selector-logo {
    height: 56px;
    width: auto;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.selector-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.25;
}

.selector-hero p {
    font-size: 16px;
    margin: 0;
    opacity: 0.88;
    line-height: 1.6;
}

/* ── Filters ─────────────────────────────────────────── */
.selector-filters {
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.selector-container {
    max-width: 1200px;
    margin: 0 auto;
}

.selector-filters .selector-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.selector-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.selector-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

.selector-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.selector-select-icon {
    position: absolute;
    right: 12px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.selector-select {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: 42px;
}

.selector-select:focus {
    outline: none;
    border-color: #1a4fa8;
    box-shadow: 0 0 0 3px rgba(26, 79, 168, 0.15);
}

.selector-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px !important;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: 42px;
    box-sizing: border-box;
}

.selector-input:focus {
    outline: none;
    border-color: #1a4fa8;
    box-shadow: 0 0 0 3px rgba(26, 79, 168, 0.15);
}

.selector-input::placeholder {
    color: #9ca3af;
}

.selector-detected-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #1a4fa8;
    margin: 0;
}

/* ── Results section ─────────────────────────────────── */
.selector-results {
    padding: 32px 24px 48px;
}

.selector-count {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px;
}

/* ── Loading state ───────────────────────────────────── */
.selector-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 0;
    color: #6b7280;
    font-size: 14px;
}

.selector-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Empty state ─────────────────────────────────────── */
.selector-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
    color: #9ca3af;
}

.selector-empty svg {
    opacity: 0.4;
}

.selector-empty p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.selector-reset-btn {
    padding: 10px 24px;
    background: #1a4fa8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.selector-reset-btn:hover {
    background: #13378a;
}

/* ── Grid ────────────────────────────────────────────── */
.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Card ────────────────────────────────────────────── */
.selector-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.selector-card:hover {
    border-color: #1a4fa8;
    box-shadow: 0 4px 20px rgba(26, 79, 168, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

/* Card logo */
.selector-card-logo {
    height: 140px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #e8ecf0;
}

.selector-card-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 16px;
}

.selector-card-initials {
    font-size: 40px;
    font-weight: 700;
    color: #1a4fa8;
    letter-spacing: -1px;
    user-select: none;
}

/* Card body */
.selector-card-body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.selector-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.selector-card-country {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.selector-card-country svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.selector-card-address {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card CTA */
.selector-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    color: #1a4fa8;
    transition: background 0.15s;
}

.selector-card:hover .selector-card-cta {
    background: #eef2fb;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .selector-hero {
        padding: 48px 20px 40px;
    }

    .selector-hero h1 {
        font-size: 26px;
    }

    .selector-logo {
        height: 44px;
    }

    .selector-filters .selector-container {
        flex-direction: column;
        gap: 16px;
    }

    .selector-filter-group {
        min-width: 0;
        width: 100%;
    }

    .selector-results {
        padding: 24px 16px 40px;
    }

    .selector-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .selector-hero h1 {
        font-size: 22px;
    }

    .selector-hero p {
        font-size: 14px;
    }
}
