/**
 * Classroom Popup - Popup Styles
 *
 * Styles for content popup modal (frontend)
 */

/* Overlay */
.classroom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: cpFadeIn 0.3s ease;
}

@keyframes cpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal */
.classroom-popup-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cpSlideUp 0.3s ease;
}

@keyframes cpSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.classroom-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FFD54F 0%, #FCAF17 100%);
    border-radius: 12px 12px 0 0;
}

.classroom-popup-header h2 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    font-weight: 600;
}

.classroom-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.classroom-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body */
.classroom-popup-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* Content Styling */
.classroom-popup-body p {
    margin-bottom: 16px;
}

.classroom-popup-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.classroom-popup-body a {
    color: #FCAF17;
    text-decoration: underline;
}

.classroom-popup-body a:hover {
    color: #F59E0B;
}

.classroom-popup-body h1,
.classroom-popup-body h2,
.classroom-popup-body h3,
.classroom-popup-body h4 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.classroom-popup-body ul,
.classroom-popup-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.classroom-popup-body li {
    margin-bottom: 8px;
}

.classroom-popup-body blockquote {
    margin: 16px 0;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #FCAF17;
    border-radius: 4px;
}

/* Footer */
.classroom-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.classroom-popup-continue {
    background: linear-gradient(135deg, #FFD54F 0%, #FCAF17 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(252, 175, 23, 0.4);
}

.classroom-popup-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 175, 23, 0.5);
}

.classroom-popup-continue:active {
    transform: translateY(0);
}

/* Body scroll lock */
body.classroom-popup-active {
    overflow: hidden;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .classroom-popup-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .classroom-popup-header {
        padding: 16px;
        border-radius: 8px 8px 0 0;
    }

    .classroom-popup-header h2 {
        font-size: 18px;
    }

    .classroom-popup-body {
        padding: 16px;
        font-size: 15px;
    }

    .classroom-popup-footer {
        padding: 12px 16px;
        border-radius: 0 0 8px 8px;
    }

    .classroom-popup-continue {
        width: 100%;
        padding: 14px;
    }
}
