/**
 * Quiz Access Elements Styles
 * Popup Modal, Floating Button, Header Button, Homepage Widget
 * Uses theme colors for seamless integration
 */

/* ===== POPUP MODAL ===== */
.fmm-quiz-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.fmm-quiz-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.fmm-quiz-popup-content {
    position: relative;
    max-width: 500px;
    margin: 100px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fmmPopupSlideIn 0.3s ease-out;
}

@keyframes fmmPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fmm-quiz-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
}

.fmm-quiz-popup-close:hover {
    color: #333;
}

.fmm-quiz-popup-body {
    padding: 40px 30px;
    text-align: center;
}

.fmm-quiz-popup-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-dark, #333);
    margin-bottom: 15px;
}

.fmm-quiz-popup-body p {
    font-size: 16px;
    color: var(--gray, #666);
    margin-bottom: 25px;
    line-height: 1.6;
}

.fmm-quiz-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.fmm-quiz-popup-btn .material-icons {
    font-size: 20px;
}

/* ===== FLOATING BUTTON ===== */
.fmm-quiz-floater {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary, #25b9d7);
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: fmmFloaterPulse 2s infinite;
}

.fmm-quiz-floater:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
    opacity: 0.9;
}

.fmm-quiz-floater .material-icons {
    font-size: 22px;
}

@keyframes fmmFloaterPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    }
}

/* ===== HEADER BUTTON ===== */
.fmm-quiz-header-btn {
    display: inline-block;
    margin-left: 15px;
}

.fmm-quiz-header-btn .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.fmm-quiz-header-btn .material-icons {
    font-size: 18px;
}

/* ===== HOMEPAGE WIDGET ===== */
.fmm-quiz-home-section {
    padding: 60px 0;
    background: var(--gray-light, #f5f7fa);
}

.fmm-quiz-home-header {
    text-align: center;
    margin-bottom: 40px;
}

.fmm-quiz-home-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-dark, #333);
    margin-bottom: 10px;
}

.fmm-quiz-home-header p {
    font-size: 18px;
    color: var(--gray, #666);
}

.fmm-quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.fmm-quiz-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-lighter, #e8e8e8);
}

.fmm-quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.fmm-quiz-card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--primary, #25b9d7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fmm-quiz-card-icon .material-icons {
    font-size: 36px;
    color: #fff;
}

.fmm-quiz-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-dark, #333);
    margin-bottom: 12px;
}

.fmm-quiz-card-description {
    font-size: 15px;
    color: var(--gray, #666);
    line-height: 1.6;
    margin-bottom: 20px;
}

.fmm-quiz-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    font-weight: 600;
}

.fmm-quiz-card-btn .material-icons {
    font-size: 18px;
}

.fmm-quiz-home-footer {
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .fmm-quiz-floater span {
        display: none;
    }

    .fmm-quiz-floater {
        padding: 15px;
        border-radius: 50%;
    }

    .fmm-quiz-popup-content {
        margin: 50px 20px;
    }

    .fmm-quiz-home-header h2 {
        font-size: 28px;
    }

    .fmm-quiz-grid {
        grid-template-columns: 1fr;
    }
}