/* ============================================
   POPUPS NOTIFICATIONS WEBPUSH
   ============================================ */

/* Overlay de fond */
.webpush-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webpush-overlay.active {
    display: block;
    opacity: 1;
}

/* Container de la popup */
.webpush-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--element-bg-color, white);
    border-radius: var(--border-radius, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.webpush-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Header de la popup */
.webpush-popup-header {
    padding: var(--spacing-xl, 24px);
    border-bottom: 1px solid var(--on-bg-color, #e0e0e0);
    position: relative;
}

.webpush-popup-header h3 {
    margin: 0;
    font-size: var(--font-size-xl, 20px);
    color: var(--text-color, #333);
    font-weight: var(--bold, 600);
}

.webpush-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color, #999);
    opacity: 0.5;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-round, 50%);
    transition: all 0.2s ease;
}

.webpush-popup-close:hover {
    background: var(--on-bg-color, #f5f5f5);
    opacity: 1;
}

/* Body de la popup */
.webpush-popup-body {
    padding: var(--spacing-xl, 24px);
}

.webpush-popup-body p {
    margin: 0 0 var(--spacing-lg, 16px) 0;
    color: var(--text-color, #555);
    line-height: 1.6;
}

.webpush-popup-body p:last-child {
    margin-bottom: 0;
}

/* Icon de statut */
.webpush-status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-xl, 20px);
    border-radius: var(--border-radius-round, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.webpush-status-icon.success {
    background: var(--primary-color, #4caf50);
    color: var(--text-white, white);
}

.webpush-status-icon.error {
    background: var(--error-color, #f44336);
    color: var(--text-white, white);
}

.webpush-status-icon.info {
    background: var(--message-color, #2196f3);
    color: var(--text-white, white);
}

/* Instructions d'activation */
.webpush-instructions {
    background: var(--on-bg-color, #f5f5f5);
    border-radius: var(--border-radius-md, 8px);
    padding: var(--spacing-lg, 16px);
    margin-top: var(--spacing-xl, 20px);
}

.webpush-instructions h4 {
    margin: 0 0 var(--spacing-md, 12px) 0;
    font-size: var(--font-size-md, 16px);
    color: var(--text-color, #333);
    font-weight: var(--semi-bold, 600);
}

.webpush-device-tabs {
    display: flex;
    gap: var(--spacing-sm, 8px);
    margin-bottom: var(--spacing-lg, 16px);
    border-bottom: 2px solid var(--on-bg-color, #e0e0e0);
    flex-wrap: wrap;
}

.webpush-device-tab {
    padding: var(--spacing-sm, 8px) var(--spacing-lg, 16px);
    background: none;
    border: none;
    color: var(--text-color, #666);
    opacity: 0.6;
    cursor: pointer;
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--medium, 500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.webpush-device-tab:hover {
    opacity: 1;
}

.webpush-device-tab.active {
    color: var(--primary-color, #2196f3);
    opacity: 1;
    border-bottom-color: var(--primary-color, #2196f3);
}

.webpush-device-content {
    display: none;
}

.webpush-device-content.active {
    display: block;
}

.webpush-device-content ol {
    margin: 0;
    padding-left: 20px;
}

.webpush-device-content li {
    margin-bottom: var(--spacing-md, 12px);
    color: var(--text-color, #555);
    line-height: 1.6;
}

.webpush-device-content li:last-child {
    margin-bottom: 0;
}

.webpush-device-content code {
    background: var(--background-color, #e8e8e8);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm, 4px);
    font-size: var(--font-size-xs, 13px);
    color: var(--error-color, #d32f2f);
}

/* Footer de la popup */
.webpush-popup-footer {
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 24px);
    border-top: 1px solid var(--on-bg-color, #e0e0e0);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md, 12px);
}

.webpush-btn {
    padding: var(--spacing-md, 10px) var(--spacing-xl, 20px);
    border: none;
    border-radius: var(--border-radius-md, 6px);
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--medium, 500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.webpush-btn-primary {
    background: var(--secondary-color, #2196f3);
    color: var(--text-white, white);
}

.webpush-btn-primary:hover {
    background: var(--secondary-color-hover, #1976d2);
}

.webpush-btn-secondary {
    background: var(--primary-color, #e0e0e0);
    color: var(--text-white, #333);
}

.webpush-btn-secondary:hover {
    background: var(--primary-color-hover, #c6c6c6);
}

/* Responsive */
@media (max-width: 600px) {
    .webpush-popup {
        width: 95%;
        max-height: 90vh;
    }

    .webpush-popup-header,
    .webpush-popup-body,
    .webpush-popup-footer {
        padding: var(--spacing-lg, 16px);
    }

    .webpush-popup-header h3 {
        font-size: var(--font-size-lg, 18px);
        padding-right: 30px;
    }

    .webpush-device-tabs {
        flex-wrap: wrap;
    }

    .webpush-device-tab {
        font-size: var(--font-size-xs, 13px);
        padding: 6px var(--spacing-md, 12px);
    }

    .webpush-popup-footer {
        flex-direction: column;
    }

    .webpush-btn {
        width: 100%;
    }
}
