﻿/* ==========================================================================
   Popup Styles
   ========================================================================== */
.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: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.popup-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 60%;
    min-width: 30vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    animation: slideUp 0.3s ease-in-out forwards;
    margin-top: clamp(3rem, 4vw, 3.5rem);
    margin-bottom: clamp(4rem, 5vw, 4.5rem);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

    .popup-header h3 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #666;
    transition: color 0.2s;
}

    .popup-close:hover {
        color: #333;
    }

.popup-body {
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.popup-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #eee;
    gap: 0.5rem;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 1;
}

.popup-copy {
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .popup-copy:hover {
        background: linear-gradient(135deg, #D4AF37, #FFD700);
    }

.popup-button {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

    .popup-button:hover {
        background: linear-gradient(135deg, #e9ecef, #dee2e6);
    }

.popup-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
}

.short-text {
    display: inline-block;
    margin-right: 5px;
}

.popup-success .popup-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.popup-error .popup-header {
    background: linear-gradient(135deg, #dc3545, #f86384);
    color: white;
}

.popup-warning .popup-header {
    background: linear-gradient(135deg, #ffc107, #ffb347);
    color: white;
}

.popup-info .popup-header {
    background: linear-gradient(135deg, #17a2b8, #0dcaf0);
    color: white;
}

.popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .popup-icon {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .popup-icon {
        width: 1rem;
        height: 1rem;
        font-size: 0.75rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: clamp(3rem, 4vw, 3.5rem) 1rem clamp(4rem, 5vw, 4.5rem);
    }

    .popup-header h3 {
        font-size: 1.1rem;
    }

    .popup-body {
        font-size: 0.95rem;
    }

    .popup-footer {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 100%;
        margin: clamp(3rem, 4vw, 3.5rem) 0.5rem clamp(4rem, 5vw, 4.5rem);
    }

    .popup-header {
        padding: 0.75rem;
    }

    .popup-body {
        padding: 0.75rem;
    }

    .popup-footer {
        padding: 0.5rem;
        flex-direction: column;
    }

    .popup-copy, .popup-button {
        width: 100%;
        justify-content: center;
    }
}
