/* =============================================
   Location Modal — Car-Search.ai Brand
   ============================================= */

/* ---- Overlay ---- */
.location-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ---- Modal Content ---- */
.location-modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: locationModalIn 0.25s ease-out;
}

@keyframes locationModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ---- Header ---- */
.location-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.location-modal-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.location-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Body ---- */
.location-modal-body {
    padding: 20px 24px;
}

.location-modal-description {
    margin: 0 0 16px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* ---- Input Group ---- */
.location-input-group {
    margin-bottom: 16px;
}

.location-input-group label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.location-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.location-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.location-input:focus {
    border-color: var(--gold, #EC660A);
    box-shadow: 0 0 0 3px rgba(236, 102, 10, 0.15);
}

/* ---- Loading ---- */
.location-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.location-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top: 2px solid var(--gold, #EC660A);
    border-radius: 50%;
    animation: locationSpin 0.8s linear infinite;
}

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

/* ---- Error ---- */
.location-error {
    padding: 10px 14px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* ---- Suggestions ---- */
.location-suggestions-label {
    margin: 0 0 8px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.location-suggestion-item:hover {
    background: #323232;
    border-color: var(--gold, #EC660A);
}

.location-suggestion-item svg {
    color: var(--gold, #EC660A);
    flex-shrink: 0;
}

/* ---- Example Buttons ---- */
.location-examples {
    margin-top: 16px;
}

.location-examples-label {
    margin: 0 0 10px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.location-example-btn {
    padding: 8px 14px;
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-example-btn:hover {
    background: var(--gold, #EC660A);
    border-color: var(--gold, #EC660A);
    color: #fff;
}

/* ---- Footer ---- */
.location-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.location-cancel-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-cancel-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
    .location-modal-overlay {
        padding: 10px;
    }

    .location-modal-content {
        max-width: 100%;
        border-radius: 12px;
    }

    .location-modal-header {
        padding: 16px 18px 14px;
    }

    .location-modal-body {
        padding: 16px 18px;
    }

    .location-modal-footer {
        padding: 14px 18px 16px;
    }
}
