/* Location Services Styles */

/* Location Notifications */
.location-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.location-notification.loading {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
}

.location-notification.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.location-notification.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.location-content {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 12px;
}

.location-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.location-text {
    flex: 1;
}

.location-text strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.location-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.location-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.location-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.location-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3e3e3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Location Permission Modal */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.location-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease-out;
}

.location-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.location-modal-header i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 12px;
}

.location-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.location-modal-body {
    padding: 24px;
}

.location-modal-body p {
    margin-bottom: 16px;
    color: #666;
    line-height: 1.6;
}

.location-modal-body ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.location-modal-body li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #555;
}

.location-modal-body li i {
    width: 24px;
    color: #007bff;
    margin-right: 12px;
}

.location-privacy {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-top: 20px;
    font-size: 0.9rem;
}

.location-privacy i {
    color: #28a745;
    margin-right: 8px;
}

.location-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.location-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.location-deny {
    background: #6c757d;
    color: white;
    border: none;
}

.location-deny:hover {
    background: #5a6268;
}

.location-allow {
    background: #007bff;
    color: white;
    border: none;
}

.location-allow:hover {
    background: #0056b3;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Location Button Styles */
.location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.location-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.location-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.location-btn i {
    font-size: 1rem;
}

/* Location Status Indicator */
.location-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.location-status.granted {
    background: #d4edda;
    color: #155724;
}

.location-status.denied {
    background: #f8d7da;
    color: #721c24;
}

.location-status.prompt {
    background: #fff3cd;
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .location-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .location-modal-content {
        width: 95%;
        margin: 20px;
    }

    .location-modal-header {
        padding: 20px 16px 12px;
    }

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

    .location-modal-footer {
        padding: 12px 16px 20px;
        flex-direction: column;
    }

    .location-modal-footer .btn {
        width: 100%;
    }
}

/* Integration with existing notification system */
.location-notification.has-notification {
    top: 80px; /* Adjust if main notification bar is present */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .location-notification {
        background: #2d3748;
        color: #e2e8f0;
    }

    .location-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }

    .location-modal-header {
        border-bottom-color: #4a5568;
    }

    .location-privacy {
        background: #4a5568;
        color: #e2e8f0;
    }
}
