/* assets/css/location-modal.css - Updated for better manual location UX */

/* ==================== LOCATION GATEWAY MODAL ==================== */
.location-gateway-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
}

.location-gateway-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== HEADER ==================== */
.location-gateway-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.gateway-logo {
    margin-bottom: 1rem;
}

.gateway-logo img {
    height: 40px;
    width: auto;
}

.location-gateway-header h2 {
    color: #1a1a1a;
    margin: 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.location-gateway-header p {
    color: #666;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.current-location-badge {
    display: inline-block;
    background: rgba(0, 135, 83, 0.1);
    color: #008753;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 1rem;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 135, 83, 0.2);
}

.current-location-icon {
    margin-right: 5px;
}

/* ==================== LOCATION OPTIONS ==================== */
.location-options {
    padding: 1.5rem 2rem;
}

.location-option-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 70px;
}

.location-option-card:last-child {
    margin-bottom: 0;
}

.location-option-card:hover {
    border-color: #008753;
    box-shadow: 0 4px 12px rgba(0, 135, 83, 0.15);
    transform: translateY(-2px);
}

.option-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 135, 83, 0.1);
    border-radius: 12px;
    margin-right: 1rem;
    color: #008753;
}

.option-icon svg {
    width: 24px;
    height: 24px;
}

.option-content {
    flex: 1;
    min-width: 0;
}

.option-content h4 {
    margin: 0 0 0.25rem 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ==================== MANUAL LOCATION CARD IMPROVEMENTS ==================== */

/* Make entire card cursor pointer when not expanded */
.location-option-card.manual-option:not(.expanded) {
    cursor: pointer !important;
}

/* Make the arrow much bigger and more visible */
.option-arrow {
    font-size: 24px !important;  /* Increased from 18px */
    font-weight: 600 !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;  /* Added min-width */
    height: 40px !important;     /* Added height */
    border-radius: 20px !important; /* Make it circular */
    transition: all 0.3s ease !important;
    background: rgba(0, 135, 83, 0.1) !important; /* Light green background */
    color: #008753 !important;
    margin-left: 0.5rem !important;
    flex-shrink: 0 !important;
}

/* Hover effect on arrow */
.location-option-card:not(.expanded):hover .option-arrow {
    background: rgba(0, 135, 83, 0.2) !important;
    transform: translateX(4px) !important; /* Slight movement on hover */
}

/* Manual arrow specific styling - make it even more prominent */
.location-option-card.manual-option .option-arrow {
    background: rgba(0, 135, 83, 0.15) !important;
    color: #008753 !important;
    font-size: 26px !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 22px !important;
    position: relative !important;
    z-index: 2 !important; /* Ensure arrow is above other elements */
}

/* Arrow in expanded state */
.location-option-card.manual-option.expanded .option-arrow {
    background: rgba(0, 135, 83, 0.25) !important;
    transform: rotate(90deg) !important; /* Pointing up */
}

/* Add hover effect to entire manual card when not expanded */
.location-option-card.manual-option:not(.expanded):hover {
    border-color: #008753 !important;
    box-shadow: 0 4px 12px rgba(0, 135, 83, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Add a visual cue to show it's clickable */
.location-option-card.manual-option:not(.expanded):after {
    content: 'Click to select location' !important;
    position: absolute !important;
    bottom: 10px !important;
    right: 60px !important; /* Position near the arrow */
    font-size: 11px !important;
    color: #008753 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.location-option-card.manual-option:not(.expanded):hover:after {
    opacity: 0.8 !important;
}

/* ==================== MANUAL SELECT FORM ==================== */
.manual-select-form {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: none;
}

.manual-select-form.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #008753;
    box-shadow: 0 0 0 3px rgba(0, 135, 83, 0.1);
}

.form-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.optional-note {
    display: block;
    margin-top: 0.25rem;
    color: #888;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel {
    flex: 1;
    padding: 0.75rem;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-set-location {
    flex: 1;
    padding: 0.75rem;
    background: #008753;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-set-location:hover {
    background: #006640;
}

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

/* ==================== PRIVACY NOTE ==================== */
.location-privacy-note {
    padding: 1rem 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #f9f9f9;
    border-radius: 0 0 16px 16px;
}

.location-privacy-note p {
    margin: 0;
    color: #777;
    font-size: 0.85rem;
}

.location-privacy-note a {
    color: #008753;
    text-decoration: none;
    font-weight: 500;
}

.location-privacy-note a:hover {
    text-decoration: underline;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .location-gateway-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .location-gateway-header,
    .location-options,
    .location-privacy-note {
        padding: 1.5rem 1.25rem;
    }
    
    .location-gateway-header h2 {
        font-size: 1.5rem;
    }
    
    .location-option-card {
        padding: 1rem;
        min-height: 65px;
    }
    
    .option-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .option-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .option-content h4 {
        font-size: 1rem;
    }
    
    .option-content p {
        font-size: 0.85rem;
    }
    
    /* Mobile responsive improvements */
    /* Make arrow even more prominent on mobile */
    .option-arrow {
        font-size: 28px !important;
        min-width: 48px !important;
        height: 48px !important;
        border-radius: 24px !important;
    }
    
    /* Make entire card more tappable on mobile */
    .location-option-card.manual-option {
        padding: 16px !important;
        min-height: 80px !important;
    }
    
    /* Remove the hover text on mobile */
    .location-option-card.manual-option:not(.expanded):after {
        display: none !important;
    }
    
    /* Add visual feedback on mobile tap */
    .location-option-card.manual-option:not(.expanded):active {
        transform: scale(0.98) !important;
    }
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }
    
    .option-arrow {
        font-size: 22px !important;
        min-width: 40px !important;
        height: 40px !important;
        border-radius: 20px !important;
    }
    
    .location-option-card.manual-option .option-arrow {
        font-size: 24px !important;
        min-width: 42px !important;
        height: 42px !important;
        border-radius: 21px !important;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.option-arrow:focus {
    outline: 2px solid #008753 !important;
    outline-offset: 2px !important;
}

.location-option-card.manual-option:focus-within {
    outline: 2px solid #008753 !important;
    outline-offset: 4px !important;
}

button:focus,
select:focus,
input:focus {
    outline: 2px solid #008753;
    outline-offset: 2px;
}

/* ==================== EXPANDED CARD STATE ==================== */
.location-option-card.expanded {
    border-color: #008753;
    background: #f8fafc;
    min-height: auto;
    align-items: flex-start;
}

.location-option-card.expanded .option-content {
    flex: 1;
}