/* Popup Manager Pro - Frontend Styles */

.pm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    animation: pm-fade-in 0.3s ease;
}

.pm-overlay.pm-visible {
    display: flex;
}

.pm-popup {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    padding: 0;
    animation: pm-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
}

.pm-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.15);
    color: inherit;
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.pm-close:hover {
    background: rgba(0,0,0,0.3);
    transform: scale(1.1);
}

.pm-image-wrap {
    width: 100%;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    max-height: 280px;
}

.pm-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pm-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    padding: 24px 28px 8px;
    line-height: 1.3;
}

.pm-body {
    padding: 0 28px 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.pm-body p {
    margin: 0 0 10px;
}

.pm-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 28px 28px;
}

.pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    flex: 1;
    min-width: 140px;
    justify-content: center;
    white-space: nowrap;
}

.pm-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.pm-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes pm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pm-slide-up {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pm-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.pm-overlay.pm-hiding {
    animation: pm-fade-out 0.25s ease forwards;
}

@media (max-width: 480px) {
    .pm-title {
        font-size: 1.3rem;
        padding: 20px 20px 8px;
    }
    .pm-body {
        padding: 0 20px 16px;
    }
    .pm-buttons {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    .pm-btn {
        flex: none;
        width: 100%;
    }
}
