/**
 * EduTask AHC - Stylesheet Kuis Interaktif, Formulir & Portal Widget
 * Desain modern, clean, minimalis, dan responsif.
 */

/* ============================================================
   1. KUIS INTERAKTIF & TIMER
   ============================================================ */

.edutask-quiz-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    max-width: 800px;
    margin: 24px auto;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
}

.edutask-quiz-container * {
    box-sizing: border-box;
}

/* LAYAR PEMBUKA (START SCREEN) */
.quiz-header-badge {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.quiz-title {
    margin: 0 0 12px 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.quiz-desc {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* KOTAK EMBED DOKUMEN / MATERI */
.edutask-embed-doc-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    gap: 16px;
}

.embed-icon {
    font-size: 28px;
}

.embed-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.embed-info strong {
    font-size: 14px;
    color: #1e293b;
}

.embed-info span {
    font-size: 13px;
    color: #64748b;
}

.edutask-btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.edutask-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* GRID INFORMASI KUIS */
.quiz-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-icon {
    font-size: 22px;
}

.meta-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.meta-item strong {
    font-size: 14px;
    color: #0f172a;
}

/* INPUT IDENTITAS TAMU */
.edutask-guest-inputs {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.edutask-guest-inputs h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.edutask-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
}

.edutask-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.edutask-btn-start {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    padding: 13px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    width: 100% !important;
    display: inline-block !important;
    text-align: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.edutask-btn-start:hover {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

/* STICKY TIMER BAR */
.edutask-quiz-timer-bar {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.timer-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.timer-countdown-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    padding: 6px 14px;
    border-radius: 8px;
}

.timer-digits {
    font-size: 18px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 0.05em;
    color: #38bdf8;
}

.timer-warning .timer-digits {
    color: #f87171 !important;
    animation: edutaskBlink 1s infinite;
}

@keyframes edutaskBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* BUTIR SOAL KUIS */
.quiz-questions-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.quiz-question-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.q-card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.q-number-badge {
    font-size: 12px;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
    padding: 2px 8px;
    border-radius: 4px;
}

.q-points-badge {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.q-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.5;
}

.q-options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.q-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.q-option-label:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.q-option-label input[type="radio"] {
    accent-color: #2563eb;
    width: 18px;
    height: 18px;
}

.quiz-submit-bar {
    margin-top: 32px;
    text-align: right;
}

.edutask-btn-submit {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.edutask-btn-submit:hover {
    background: #059669;
}

/* KARTU SUDAH SELESAI */
.edutask-card-completed {
    text-align: center;
    padding: 30px 20px;
}

.completed-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
}

.completed-score-badge {
    margin-top: 16px;
    display: inline-block;
    background: #f1f5f9;
    padding: 8px 24px;
    border-radius: 30px;
}

.score-num {
    font-size: 26px;
    font-weight: 800;
    color: #2563eb;
}

.score-max {
    font-size: 16px;
    color: #64748b;
    font-weight: 600;
}

/* TOMBOL MANIS: KEMBALI KE PORTAL SISWA */
.edutask-btn-portal {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.edutask-btn-portal:hover {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

/* BREADCRUMB KEMBALI KE PORTAL */
.edutask-portal-breadcrumb {
    font-size: 13px;
    font-weight: 500;
}

.edutask-portal-breadcrumb a {
    color: #64748b !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.18s ease !important;
}

.edutask-portal-breadcrumb a:hover {
    color: #1e293b !important;
    text-decoration: underline !important;
}

/* ============================================================
   2. FORMULIR GOOGLE FORM STYLE
   ============================================================ */

.edutask-form-wrapper {
    max-width: 680px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.edutask-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.form-header-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

.form-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.form-desc {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.form-field-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.form-field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 8px;
}

.edutask-btn-primary {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.edutask-btn-primary:hover {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

/* ============================================================
   3. WIDGET PORTAL SISWA [edutask_student_tasks]
   ============================================================ */

.edutask-student-tasks-wrap {
    margin: 20px 0;
    font-family: inherit;
}

.edutask-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.edutask-student-task-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.edutask-student-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.task-type-badge.type-quiz { background: #fef3c7; color: #b45309; }
.task-type-badge.type-form { background: #dcfce7; color: #15803d; }
.task-type-badge.type-event { background: #e0f2fe; color: #0369a1; }
.task-type-badge.type-blog_url { background: #f3e8ff; color: #7e22ce; }

.task-date-info {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.task-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.task-meta-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.task-chip {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.task-card-action {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.task-done-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.done-check {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
}

.done-score {
    font-size: 12px;
    font-weight: 800;
    background: #f0fdf4;
    color: #16a34a;
    padding: 2px 6px;
    border-radius: 4px;
}

.edutask-btn-action {
    background: #1e293b !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    border: 1px solid #1e293b !important;
}

.edutask-btn-action:hover {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .edutask-quiz-container, .edutask-form-card {
        padding: 20px;
    }
    .quiz-meta-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
    }
}
