/* Permission Manager Styles */

.permission-status-bar {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #f59e0b;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.permission-status-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.permission-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.permission-text {
    font-weight: 500;
    color: #92400e;
}

.permission-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.permission-status.granted {
    background: #d1fae5;
    color: #065f46;
}

.permission-status.denied {
    background: #fee2e2;
    color: #991b1b;
}

.permission-status.prompt {
    background: #fef3c7;
    color: #92400e;
}

.permission-status.unknown,
.permission-status.unsupported {
    background: #f3f4f6;
    color: #6b7280;
}

/* Permission Modal */
.permission-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.permission-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.permission-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.permission-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.permission-modal-body {
    padding: 0 1.5rem;
}

.permission-section {
    margin-bottom: 2rem;
}

.permission-section:last-child {
    margin-bottom: 0;
}

.permission-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.permission-header .permission-icon {
    width: 24px;
    height: 24px;
    color: #6366f1;
}

.permission-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.permission-section p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.permission-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toast Notifications */
.permission-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ef4444;
    animation: slideIn 0.3s ease-out;
}

.permission-toast.error {
    border-left-color: #ef4444;
}

.permission-toast.success {
    border-left-color: #10b981;
}

.permission-toast.warning {
    border-left-color: #f59e0b;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
}

.toast-content svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.permission-toast.error .toast-content svg {
    color: #ef4444;
}

.permission-toast.success .toast-content svg {
    color: #10b981;
}

.permission-toast.warning .toast-content svg {
    color: #f59e0b;
}

.toast-text {
    flex: 1;
}

.toast-text strong {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.toast-text p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    font-size: 1.25rem;
    line-height: 1;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .permission-status-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .permission-item {
        justify-content: space-between;
    }
    
    .permission-modal {
        padding: 0.5rem;
    }
    
    .permission-modal-content {
        max-height: 95vh;
    }
    
    .permission-toast {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}

/* Hide permission bar when all permissions are granted */
.permission-status-bar.all-granted {
    display: none;
}

/* Show permission bar when permissions are needed */
.permission-status-bar.permissions-needed {
    display: block;
}
