/* ═══════════════════════════════════════════════
   Location Screen — Market + Filming Location
   Silver card frames, custom dropdowns with search
   ═══════════════════════════════════════════════ */

/* ─── LAYOUT ─── */
.loc-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 88px);
    padding: 88px 2.5rem 40px;
    gap: 1.5rem;
}

/* ─── HEADER ─── */
.loc-header {
    text-align: center;
    margin-bottom: 0.5rem;
}
.loc-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
    margin: 0 0 0.5rem 0;
}
.loc-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* ─── CARDS CONTAINER ─── */
.loc-cards {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
}

/* ─── CARD ─── */
.loc-card {
    position: relative;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(192,192,192,0.3);
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem;
    width: 320px;
    display: flex;
    flex-direction: column;
}

/* Silver glow line */
.loc-card-glow {
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192,192,192,0.5), transparent);
    border-radius: 1px;
}

.loc-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin: 0 0 0.25rem 0;
}

.loc-card-note {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.35);
    margin: 0 0 0.75rem 0;
    font-style: italic;
}

.loc-card-explain {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.35);
    margin: 0 0 0.75rem 0;
}

.loc-card-section-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(192,192,192,0.6);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(192,192,192,0.1);
}

/* ─── FIELD ─── */
.loc-field {
    margin-bottom: 1rem;
}
.loc-field:last-child {
    margin-bottom: 0;
    margin-top: auto;
}
.loc-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.4rem;
}

/* ─── DROPDOWN (reuses subcat pattern) ─── */
.loc-dropdown {
    position: relative;
}
.loc-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(192,192,192,0.2);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: left;
}
.loc-dropdown-trigger:hover:not(:disabled) {
    border-color: rgba(192,192,192,0.4);
    background: rgba(255,255,255,0.06);
}
.loc-dropdown-trigger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.loc-dropdown-trigger.has-value {
    color: #fff;
    border-color: rgba(192,192,192,0.35);
}

/* ─── DROPDOWN LIST ─── */
.loc-dropdown-list {
    display: none;
    position: absolute;
    left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    border: 1px solid rgba(192,192,192,0.35);
    border-radius: 10px;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
/* Default: opens downward */
.loc-dropdown.open .loc-dropdown-list {
    display: block;
    top: calc(100% + 4px);
    bottom: auto;
}
/* Flip: opens upward when near bottom */
.loc-dropdown.open.flip-up .loc-dropdown-list {
    top: auto;
    bottom: calc(100% + 4px);
}

/* ─── SEARCH INPUT ─── */
.loc-search {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.04);
    border: none;
    border-bottom: 1px solid rgba(192,192,192,0.15);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    outline: none;
    box-sizing: border-box;
}
.loc-search::placeholder {
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
}

/* ─── ITEMS CONTAINER ─── */
.loc-items {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}
.loc-items::-webkit-scrollbar { width: 6px; }
.loc-items::-webkit-scrollbar-track { background: transparent; }
.loc-items::-webkit-scrollbar-thumb {
    background: rgba(192,192,192,0.4);
    border-radius: 3px;
}
.loc-items::-webkit-scrollbar-thumb:hover {
    background: rgba(192,192,192,0.6);
}

/* ─── ITEM ─── */
.loc-item {
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.loc-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.loc-item.selected {
    color: #fff;
    background: rgba(192,192,192,0.1);
}
.loc-item.hidden {
    display: none;
}

/* ─── SUBMIT BUTTON — matches format-submit / style-submit ─── */
.loc-action {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}
.loc-submit {
    border-radius: 1rem;
    padding: 0.85rem 3.5rem;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #FFF 0%, #A0A0A0 100%);
    color: #000;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3;
    pointer-events: none;
    white-space: nowrap;
}
.loc-submit.enabled {
    opacity: 1;
    pointer-events: auto;
}
.loc-submit.enabled:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

/* ─── RESPONSIVE ─── */

/* Tablet */
@media (max-width: 768px) {
    .loc-layout {
        padding: 88px 1.5rem 40px;
    }
    .loc-cards {
        gap: 1.5rem;
    }
    .loc-card {
        width: 280px;
        padding: 1.5rem 1.25rem;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .loc-layout {
        padding: 80px 1rem 30px;
        justify-content: flex-start;
        padding-top: 100px;
    }
    .loc-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }
    .loc-card {
        width: 100%;
        max-width: 340px;
        padding: 1.25rem 1rem;
    }
    .loc-submit {
        width: 100%;
        max-width: 340px;
    }
}
