/* /local/popap/frontend/popup.css */

.popap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    z-index: 999999;
    animation: popapFadeIn 0.3s ease;
}

/* Позиционирование */
.popap-overlay[data-position="top-left"] {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.popap-overlay[data-position="top-center"] {
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.popap-overlay[data-position="top-right"] {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.popap-overlay[data-position="bottom-left"] {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
}

.popap-overlay[data-position="bottom-center"] {
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.popap-overlay[data-position="bottom-right"] {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.popap-overlay[data-position="center"] {
    align-items: center;
    justify-content: center;
}

.popap-overlay.popap-closing {
    animation: popapFadeOut 0.3s ease;
}

.popap-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.popap-inner {
    overflow-y: auto;
}

.popap-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    z-index: 10;
}

.popap-close:hover {
    color: #333;
}

@keyframes popapFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes popapFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}