/* Custom Popup Styles */
/* Modern, clean aesthetic matching "Clean Comfort" theme */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-header {
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.popup-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.1);
}

.popup-body {
    padding: var(--space-md);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

.popup-footer {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-cotton);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* Variants */
.popup-success .popup-header {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

.popup-success .popup-title {
    color: var(--success);
}

.popup-error .popup-header {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

.popup-error .popup-title {
    color: var(--error);
}

.popup-info .popup-header {
    background-color: rgba(30, 58, 138, 0.05);
    /* accent-blue tint */
    color: var(--accent-blue);
    border-bottom-color: rgba(30, 58, 138, 0.1);
}

.popup-info .popup-title {
    color: var(--accent-blue);
}

/* Animations */
@keyframes popup-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.popup-shake {
    animation: popup-shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}