/* 
 * PREMIUM UI DESIGN STYLES FOR LOCATION PICKER
 * Modern, clean, and mobile-responsive layout
 */
:root {
    --picker-primary: #2563eb;
    --picker-primary-hover: #1d4ed8;
    --picker-surface: #ffffff;
    --picker-background: #f8fafc;
    --picker-border: #e2e8f0;
    --picker-text-primary: #0f172a;
    --picker-text-muted: #64748b;
    --picker-radius-lg: 16px;
    --picker-radius-md: 8px;
    --picker-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --picker-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.location-picker-card {
    background: var(--picker-surface);
    border-radius: var(--picker-radius-lg);
    box-shadow: var(--picker-shadow-lg);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: var(--picker-text-primary);
}

.location-picker-card * {
    box-sizing: border-box;
}

.picker-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--picker-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.picker-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-current-location {
    background: var(--picker-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--picker-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--picker-shadow-sm);
}

.btn-current-location:hover {
    background: var(--picker-primary-hover);
    transform: translateY(-1px);
}

.btn-current-location:active {
    transform: translateY(0);
}

.btn-current-location:disabled {
    background: var(--picker-text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-current-location svg {
    width: 16px;
    height: 16px;
}

.picker-map-container {
    width: 100%;
    height: 350px;
    background-color: #e2e8f0;
    position: relative;
    z-index: 1;
    /* keep leaflet below dropdowns if any */
}

.picker-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.picker-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.picker-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.location-picker-card label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--picker-text-muted);
    margin: 0;
}

.location-picker-card input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--picker-border);
    border-radius: var(--picker-radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--picker-text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--picker-surface);
    width: 100%;
}

.location-picker-card input:focus {
    outline: none;
    border-color: var(--picker-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.location-picker-card input[readonly] {
    background-color: var(--picker-background);
    color: var(--picker-text-muted);
    cursor: not-allowed;
}

.picker-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: var(--picker-primary);
}

.picker-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--picker-primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: picker-rotation 1s linear infinite;
    margin-right: 8px;
}

@keyframes picker-rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.picker-alert-messages {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: var(--picker-radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.picker-alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 480px) {
    .picker-form-row {
        grid-template-columns: 1fr;
    }

    .picker-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-current-location {
        width: 100%;
        justify-content: center;
    }
}