/**
 * FORDIPS TECH - Location Detection Styles
 * UI for location permission and indicator
 */

/* ===== LOCATION PERMISSION MODAL ===== */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.location-modal-content {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    animation: slideUp 0.4s ease;
}

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

.location-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

.location-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.location-modal h2 {
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-weight: 700;
}

.location-modal p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.location-benefits {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.location-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-benefits li {
    padding: 0.5rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.location-benefits li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2rem;
}

.location-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-allow-location,
.btn-decline-location {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-allow-location {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-allow-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-decline-location {
    background: #f0f0f0;
    color: #666;
}

.btn-decline-location:hover {
    background: #e0e0e0;
    color: #333;
}

#locationStatus {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #667eea;
    font-weight: 500;
    min-height: 24px;
}

/* ===== LOCATION INDICATOR ===== */
.location-indicator {
    display: none !important;
    /* Hidden per user request - only language selector should be visible */
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
    position: absolute;
    right: 150px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.location-indicator:hover {
    background: rgba(255, 255, 255, 0.2);
}

.location-flag {
    font-size: 1.2rem;
}

.location-text {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-currency {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-location-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.change-location-btn:hover {
    opacity: 1;
}

/* ===== NEAREST LOCATION BADGE ===== */
#nearestLocation {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem 0;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
    .location-indicator {
        right: 120px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .location-text {
        max-width: 80px;
    }
}

@media (max-width: 768px) {
    .location-indicator {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 0.5rem auto;
        width: fit-content;
    }

    .location-modal-content {
        padding: 2rem;
        width: 95%;
    }

    .location-modal h2 {
        font-size: 1.5rem;
    }

    .location-modal p {
        font-size: 1rem;
    }

    .location-modal-actions {
        flex-direction: column;
    }

    .location-icon {
        width: 60px;
        height: 60px;
    }

    .location-icon svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    .location-modal-content {
        padding: 1.5rem;
    }

    .location-modal h2 {
        font-size: 1.3rem;
    }

    .location-benefits {
        padding: 1rem;
    }

    .location-benefits li {
        font-size: 0.9rem;
    }
}

/* ===== LOADING ANIMATION ===== */
.location-detecting {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.location-detecting::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #667eea;
    border-color: #667eea transparent #667eea transparent;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== PRIVACY NOTE ===== */
.privacy-note {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.privacy-note svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 0.25rem;
}
