/**
 * K-Tech Quiz - Frontend Stylesheet
 * Theme: Primary #c03030, Accent #FFF200, Success #4caf50
 * Scoped cleanly for Flatsome & WordPress themes without excess !important
 */

/* -------------------------------------------------------------------------- */
/* BODY NO-SCROLL LOCK WHEN POPUP/MODAL OPENS                                */
/* -------------------------------------------------------------------------- */
body.ktech-modal-open,
html.ktech-modal-open {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

/* Container wrapper */
.ktech-quiz-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    line-height: 1.6;
    box-sizing: border-box;
    position: relative;
}

.ktech-quiz-wrapper * {
    box-sizing: border-box;
    box-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* EXPIRED CONTEST BANNER                                                    */
/* -------------------------------------------------------------------------- */
.ktech-quiz-wrapper .ktech-quiz-expired-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 6px solid #c03030;
    border-radius: 8px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(192, 48, 48, 0.1);
}

.ktech-quiz-wrapper .ktech-quiz-expired-banner .expired-icon {
    color: #c03030;
    flex-shrink: 0;
}

.ktech-quiz-wrapper .ktech-quiz-expired-banner .expired-title {
    font-size: 16px;
    font-weight: 700;
    color: #991b1b;
    margin: 0 0 4px 0;
}

.ktech-quiz-wrapper .ktech-quiz-expired-banner .expired-desc {
    font-size: 13px;
    color: #7f1d1d;
    margin: 0;
    line-height: 1.5;
}

.ktech-quiz-wrapper .ktech-form-disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* LOADING SPINNER                                                            */
/* -------------------------------------------------------------------------- */
.ktech-quiz-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.88);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ktech-quiz-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #c03030;
    border-radius: 50%;
    animation: ktech-spin 0.85s linear infinite;
}

@keyframes ktech-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ktech-quiz-loading-text {
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

/* -------------------------------------------------------------------------- */
/* STEP 1: REGISTRATION CARD (MATCHES MOCKUP DESIGN EXACTLY)                 */
/* -------------------------------------------------------------------------- */
.ktech-quiz-wrapper .ktech-quiz-register-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    padding: 40px 45px;
    width: 100%;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #c03030;
    position: relative;
}

.ktech-quiz-wrapper .ktech-quiz-register-card::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FFF200;
}

.ktech-quiz-wrapper .ktech-quiz-form-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 28px 0;
    letter-spacing: 0.2px;
}

.ktech-quiz-wrapper .ktech-quiz-form {
    width: 100%;
}

.ktech-quiz-wrapper .ktech-quiz-form-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
}

.ktech-quiz-wrapper .ktech-quiz-label {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    text-align: right;
    padding-right: 18px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.ktech-quiz-wrapper .ktech-required {
    color: #c03030;
    font-weight: bold;
    margin-left: 3px;
    display: inline-block;
}

.ktech-quiz-wrapper .ktech-quiz-input-group {
    display: flex;
    align-items: stretch;
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    overflow: visible;
    position: relative;
    width: 100%;
    min-height: 40px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ktech-quiz-wrapper .ktech-quiz-input-group:focus-within {
    border-color: #c03030;
    box-shadow: 0 0 0 3px rgba(192, 48, 48, 0.12);
}

.ktech-quiz-wrapper .ktech-quiz-input-group.ktech-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.ktech-quiz-wrapper .ktech-quiz-input-icon {
    width: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background-color: #eaedf0;
    border-right: 1px solid #cbd5e1;
    border-radius: 4px 0 0 4px;
    flex-shrink: 0;
}

.ktech-quiz-wrapper input.ktech-quiz-input,
.ktech-quiz-wrapper select.ktech-quiz-input {
    flex: 1;
    border: none;
    box-shadow: none;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    background: transparent;
    border-radius: 0 4px 4px 0;
    width: 100%;
    margin: 0;
}

.ktech-quiz-wrapper input.ktech-quiz-input::placeholder {
    color: #94a3b8;
}

/* Custom Div Select Component */
.ktech-quiz-wrapper .ktech-custom-select {
    position: relative;
    flex-grow: 1;
    user-select: none;
}

.ktech-quiz-wrapper .ktech-select-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: #0f172a;
    background: transparent;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    outline: none;
}

.ktech-quiz-wrapper .ktech-select-arrow {
    color: #64748b;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.ktech-quiz-wrapper .ktech-custom-select.is-open .ktech-select-arrow {
    transform: rotate(180deg);
}

.ktech-quiz-wrapper .ktech-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    max-height: 230px;
    overflow-y: auto;
    z-index: 99999;
    padding: 4px;
}

.ktech-quiz-wrapper .ktech-custom-select.is-open .ktech-select-options {
    display: block;
    animation: ktech-drop-fade 0.15s ease-out;
}

@keyframes ktech-drop-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ktech-quiz-wrapper .ktech-select-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #334155;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
}

.ktech-quiz-wrapper .ktech-select-option:hover {
    background: #fef2f2;
    color: #c03030;
    font-weight: 600;
}

.ktech-quiz-wrapper .ktech-select-option.is-selected {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
}

.ktech-quiz-wrapper .ktech-select-option.is-placeholder {
    color: #94a3b8;
}

.ktech-quiz-wrapper .ktech-quiz-helper-text {
    font-size: 13px;
    margin-top: 5px;
    padding-left: 240px;
    color: #0369a1;
}

.ktech-quiz-wrapper .ktech-quiz-form-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-left: 0;
    width: 100%;
}

/* Button styles (Matches Image Mockup) */
.ktech-quiz-wrapper button.ktech-quiz-btn,
.ktech-quiz-wrapper a.ktech-quiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 26px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    line-height: 1;
    margin: 0;
}

.ktech-quiz-wrapper button.ktech-quiz-btn-back {
    background-color: #64748b;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25);
}

.ktech-quiz-wrapper button.ktech-quiz-btn-back:hover {
    background-color: #475569;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.35);
}

.ktech-quiz-wrapper button.ktech-quiz-btn-start {
    background-color: #c03030;
    color: #ffffff;
    border-radius: 8px;
    border-bottom: 3px solid #FFF200;
    box-shadow: 0 3px 8px rgba(192, 48, 48, 0.3);
}

.ktech-quiz-wrapper button.ktech-quiz-btn-start:hover {
    background-color: #a82424;
    color: #FFF200;
    box-shadow: 0 5px 14px rgba(192, 48, 48, 0.4);
}

.ktech-quiz-wrapper .ktech-quiz-alert-box {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ktech-quiz-wrapper .ktech-quiz-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ktech-quiz-wrapper .ktech-quiz-alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* -------------------------------------------------------------------------- */
/* STEP 2: TOP BANNER (EXACT GOVERNMENT RED/GOLD THEME & IMAGE BANNER)       */
/* -------------------------------------------------------------------------- */
.ktech-quiz-wrapper .ktech-quiz-banner {
    position: relative;
    background: #fffbeb;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%);
    border: 1px solid #fef08a;
    border-radius: 8px;
    padding: 30px 24px 26px 24px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.ktech-quiz-wrapper .ktech-quiz-banner.has-banner-img {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.ktech-quiz-wrapper .ktech-quiz-banner-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.ktech-quiz-wrapper .ktech-quiz-banner-organizer,
.ktech-quiz-wrapper .ktech-quiz-banner-org {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #991b1b;
    line-height: 1.3;
}

.ktech-quiz-wrapper .ktech-quiz-banner-title {
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 8px 0 12px 0;
    color: #a81c1c;
    letter-spacing: 1.5px;
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ktech-quiz-wrapper .ktech-quiz-banner-subtitle {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
    max-width: 950px;
    margin: 0 auto;
    color: #991b1b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Top bar: Candidate badge + Countdown timer box (Centered) */
.ktech-quiz-wrapper .ktech-quiz-top-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 25px;
    gap: 15px;
}

.ktech-quiz-wrapper .ktech-quiz-candidate-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-size: 13px;
}

.ktech-quiz-wrapper .ktech-candidate-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #0f172a;
}

.ktech-quiz-wrapper .ktech-candidate-unit {
    color: #64748b;
    border-left: 1px solid #cbd5e1;
    padding-left: 8px;
}

.ktech-quiz-wrapper .ktech-candidate-attempt-pill {
    background: #fef08a;
    color: #854d0e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #fde047;
}

/* Countdown timer boxes */
.ktech-quiz-wrapper .ktech-quiz-timer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ktech-quiz-wrapper .ktech-quiz-timer-label {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ktech-quiz-wrapper .ktech-quiz-timer-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ktech-quiz-wrapper .ktech-timer-box {
    background: #0f172a;
    border-radius: 6px;
    padding: 6px 12px;
    min-width: 48px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ktech-quiz-wrapper .ktech-timer-number {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.ktech-quiz-wrapper .ktech-timer-sub {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1;
}

.ktech-quiz-wrapper .ktech-timer-colon {
    display: none;
}

.ktech-quiz-wrapper .ktech-timer-warning .ktech-timer-number { color: #fde047; }
.ktech-quiz-wrapper .ktech-timer-danger .ktech-timer-number  { color: #f87171; animation: ktech-pulse 1s infinite; }

/* -------------------------------------------------------------------------- */
/* QUIZ LAYOUT & QUESTIONS (EXACT DESIGN MATCH)                              */
/* -------------------------------------------------------------------------- */
.ktech-quiz-wrapper .ktech-quiz-content-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.ktech-quiz-wrapper .ktech-quiz-questions-area {
    flex: 1;
    min-width: 0;
}

.ktech-quiz-wrapper .ktech-quiz-question-item {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ktech-quiz-wrapper .ktech-quiz-question-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.ktech-quiz-wrapper .ktech-quiz-q-num-badge {
    background: #c03030;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ktech-quiz-wrapper .ktech-quiz-q-text {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.55;
    margin: 0;
}

/* Options Cards */
.ktech-quiz-wrapper .ktech-quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ktech-quiz-wrapper .ktech-quiz-option-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.15s ease-in-out;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #334155;
    line-height: 1.5;
}

.ktech-quiz-wrapper .ktech-quiz-option-label .ktech-quiz-option-text,
.ktech-quiz-wrapper .ktech-quiz-option-label span,
.ktech-quiz-wrapper .ktech-quiz-option-label strong {
    font-weight: 400;
}

.ktech-quiz-wrapper .ktech-quiz-option-label:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.ktech-quiz-wrapper .ktech-quiz-option-label.ktech-option-selected {
    border: 1px solid #c03030;
    background: #f0f9ff;
    color: #0f172a;
    font-weight: 400;
}

.ktech-quiz-wrapper .ktech-quiz-option-radio {
    margin: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #c03030;
    flex-shrink: 0;
}

/* Submit bar */
.ktech-quiz-wrapper .ktech-quiz-submit-bar {
    text-align: center;
    margin: 35px 0 20px 0;
}

.ktech-quiz-wrapper button.ktech-quiz-btn-submit-exam,
.ktech-quiz-wrapper button.ktech-quiz-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #c53030 0%, #b22424 100%);
    background-color: #c03030;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 13px 38px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(192, 48, 48, 0.35);
    transition: all 0.2s ease-in-out;
}

.ktech-quiz-wrapper button.ktech-quiz-btn-submit-exam:hover,
.ktech-quiz-wrapper button.ktech-quiz-btn-submit:hover {
    background: linear-gradient(180deg, #b22424 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(192, 48, 48, 0.48);
    transform: translateY(-1px);
    color: #ffffff;
}

.ktech-quiz-wrapper button.ktech-quiz-btn-submit-exam:active,
.ktech-quiz-wrapper button.ktech-quiz-btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(192, 48, 48, 0.3);
}

.ktech-quiz-wrapper .ktech-quiz-sidebar-submit-wrap {
    margin-top: 14px;
    width: 100%;
}

.ktech-quiz-wrapper button.ktech-sidebar-btn-submit {
    width: 100%;
    padding: 13px 18px;
}

/* Sidebar Navigation (Matches Image 2) */
.ktech-quiz-wrapper .ktech-quiz-sidebar-nav {
    width: 290px;
    min-width: 290px;
    position: sticky;
    top: 20px;
}

/* Candidate info & Progress badge above Question List */
.ktech-quiz-wrapper .ktech-quiz-sidebar-candidate-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #c03030;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.ktech-quiz-wrapper .ktech-sidebar-candidate-name {
    color: #0f172a;
    font-weight: 700;
}

.ktech-quiz-wrapper .ktech-sidebar-divider {
    color: #94a3b8;
    font-weight: 400;
}

.ktech-quiz-wrapper .ktech-sidebar-progress-badge {
    color: #475569;
    font-weight: 600;
}

.ktech-quiz-wrapper .ktech-sidebar-progress-badge strong {
    color: #c03030;
    font-size: 15px;
    font-weight: 800;
}

.ktech-quiz-wrapper .ktech-quiz-nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ktech-quiz-wrapper .ktech-quiz-nav-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    font-family: Georgia, "Times New Roman", Times, serif;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.3;
}

.ktech-quiz-wrapper .ktech-quiz-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.ktech-quiz-wrapper button.ktech-nav-btn,
.ktech-quiz-wrapper .ktech-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ktech-quiz-wrapper button.ktech-nav-btn:hover,
.ktech-quiz-wrapper .ktech-nav-btn:hover {
    border-color: #c03030;
    color: #c03030;
    background: #fef2f2;
}

.ktech-quiz-wrapper button.ktech-nav-btn.ktech-nav-answered,
.ktech-quiz-wrapper .ktech-nav-btn.ktech-nav-answered {
    background: #c03030;
    border-color: #c03030;
    color: #ffffff;
    font-weight: 700;
}

.ktech-quiz-wrapper .ktech-quiz-nav-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    font-size: 13px;
    color: #475569;
}

.ktech-quiz-wrapper .ktech-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktech-quiz-wrapper .ktech-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
}

.ktech-quiz-wrapper .ktech-dot-done {
    background: #c03030;
}

.ktech-quiz-wrapper .ktech-dot-pending {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

/* -------------------------------------------------------------------------- */
/* POPUP MODAL RESULT (PRIMARY #c03030 THEME)                                 */
/* -------------------------------------------------------------------------- */
.ktech-quiz-modal-overlay {
    position: fixed;
    top: 15%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ktech-fade-in 0.2s ease-out;

    @media only screen and (max-width: 768px) {
        top: 0;
    }
}

.ktech-quiz-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.25);
    animation: ktech-slide-up 0.25s ease-out;
    z-index: 9999;
}

.ktech-quiz-modal-header {
    background-color: #c03030;
    padding: 16px 20px;
    text-align: center;
}

.ktech-modal-header-warning {
    background-color: #d97706;
}

.ktech-quiz-modal-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ktech-quiz-modal-body {
    padding: 28px 24px;
    text-align: center;
    background: #ffffff;
}

.ktech-quiz-congrats {
    font-size: 16px;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.ktech-quiz-score-line {
    font-size: 18px;
    color: #0f172a;
    margin: 0 0 15px 0;
}

.ktech-highlight-score {
    color: #c03030;
    font-size: 26px;
    font-weight: 800;
}

.ktech-quiz-result-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.ktech-meta-item strong {
    color: #c03030;
}

.ktech-quiz-thanks {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.ktech-quiz-modal-footer {
    display: flex;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.ktech-quiz-modal-footer button {
    flex: 1;
    border-radius: 0;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ktech-quiz-btn-cancel,
.ktech-quiz-btn-close-modal {
    background-color: #f8fafc;
    color: #475569;
    border-right: 1px solid #e2e8f0;
}

.ktech-quiz-btn-cancel:hover,
.ktech-quiz-btn-close-modal:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.ktech-quiz-btn-confirm-submit,
.ktech-quiz-btn-retake {
    background-color: #c03030;
    color: #ffffff;
}

.ktech-quiz-btn-confirm-submit:hover,
.ktech-quiz-btn-retake:hover {
    background-color: #a82424;
    color: #ffffff;
}

.ktech-unanswered-warning {
    color: #c03030;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

/* -------------------------------------------------------------------------- */
/* MOBILE FLOATING DRAWER TRIGGER & BACKDROP (DESKTOP DEFAULT: HIDDEN)        */
/* -------------------------------------------------------------------------- */
.ktech-quiz-mobile-nav-toggle {
    display: none;
}

.ktech-quiz-mobile-nav-backdrop {
    display: none;
}

.ktech-mobile-drawer-header {
    display: none;
}

/* -------------------------------------------------------------------------- */
/* RESPONSIVE DESIGN & MOBILE SLIDE-IN DRAWER                                */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* Prevent body scroll when drawer is active */
    body.ktech-drawer-open {
        overflow: hidden;
        touch-action: none;
    }

    /* Floating Toggle Button on Left Edge */
    .ktech-quiz-mobile-nav-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        position: fixed;
        left: 0;
        bottom: 1%;
        transform: translateY(-50%);
        z-index: 99998;
        background: linear-gradient(135deg, #c03030 0%, #a82424 100%);
        color: #ffffff;
        border: none;
        border-radius: 0 25px 25px 0;
        padding: 11px 14px 11px 10px;
        box-shadow: 2px 4px 18px rgba(192, 48, 48, 0.45);
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        transition: all 0.2s ease;
        margin: 0;
    }

    .ktech-quiz-mobile-nav-toggle:hover {
        background: linear-gradient(135deg, #b71c1c 0%, #881337 100%);
        padding-right: 16px;
    }

    .ktech-mobile-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ktech-mobile-nav-text {
        font-size: 12px;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }

    /* Dark Backdrop Overlay */
    .ktech-quiz-mobile-nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.65);
        z-index: 999998;
        backdrop-filter: blur(2px);
    }

    /* Slide-in Left Drawer for Question List */
    .ktech-quiz-wrapper .ktech-quiz-sidebar-nav {
        position: fixed;
        top: 0;
        left: -350px;
        width: 320px;
        max-width: 88vw;
        height: 100vh;
        background: #ffffff;
        z-index: 999999;
        overflow-y: auto;
        padding: 16px 14px 40px 14px;
        box-shadow: 6px 0 30px rgba(0, 0, 0, 0.3);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .ktech-quiz-wrapper .ktech-quiz-sidebar-nav.is-open {
        left: 0;
    }

    /* Drawer Header */
    .ktech-mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 12px 4px;
        margin-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
    }

    .ktech-mobile-drawer-title {
        font-size: 16px;
        font-weight: 700;
        color: #0f172a;
    }

    .ktech-mobile-drawer-close {
        background: #f1f5f9;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        font-size: 20px;
        line-height: 1;
        color: #64748b;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
    }

    .ktech-mobile-drawer-close:hover {
        background: #fee2e2;
        color: #c03030;
    }

    .ktech-quiz-wrapper .ktech-quiz-nav-card {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .ktech-quiz-wrapper .ktech-quiz-nav-title {
        display: none;
    }

    .ktech-quiz-wrapper .ktech-quiz-nav-grid {
        max-width: 100%;
        margin: 0 0 16px 0;
        gap: 8px;
    }

    .ktech-quiz-wrapper .ktech-quiz-sidebar-candidate-info {
        max-width: 100%;
        margin: 0 0 14px 0;
        font-size: 13px;
        padding: 8px 12px;
    }

    .ktech-quiz-wrapper .ktech-quiz-sidebar-submit-wrap {
        max-width: 100%;
        margin: 14px 0 0 0;
    }

    .ktech-quiz-wrapper .ktech-quiz-content-layout {
        flex-direction: column;
    }

    .ktech-quiz-wrapper .ktech-quiz-banner-title {
        font-size: 24px;
    }

    .ktech-quiz-wrapper .ktech-quiz-top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .ktech-quiz-wrapper {
        margin: 10px 0;
    }

    .ktech-quiz-wrapper .ktech-quiz-banner {
        padding: 20px 14px 18px 14px;
        margin-bottom: 16px;
    }

    .ktech-quiz-wrapper .ktech-quiz-banner-organizer,
    .ktech-quiz-wrapper .ktech-quiz-banner-org {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .ktech-quiz-wrapper .ktech-quiz-banner-title {
        font-size: 20px;
        margin: 4px 0 8px 0;
        letter-spacing: 0.5px;
    }

    .ktech-quiz-wrapper .ktech-quiz-banner-subtitle {
        font-size: 12px;
        line-height: 1.4;
    }

    .ktech-quiz-wrapper .ktech-quiz-top-bar {
        margin-bottom: 18px;
    }

    .ktech-quiz-wrapper .ktech-timer-box {
        min-width: 42px;
        padding: 5px 8px;
    }

    .ktech-quiz-wrapper .ktech-timer-number {
        font-size: 22px;
    }

    .ktech-quiz-wrapper .ktech-quiz-register-card {
        padding: 24px 16px;
        margin: 15px auto;
    }

    .ktech-quiz-wrapper .ktech-quiz-form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .ktech-quiz-wrapper .ktech-quiz-label {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        text-align: left;
        padding-right: 0;
        margin-bottom: 6px;
        white-space: normal;
    }

    .ktech-quiz-wrapper .ktech-quiz-input-group {
        width: 100%;
    }

    .ktech-quiz-wrapper .ktech-quiz-helper-text {
        padding-left: 0;
    }

    .ktech-quiz-wrapper .ktech-quiz-form-buttons {
        width: 100%;
    }

    .ktech-quiz-wrapper button.ktech-quiz-btn {
        flex: 1;
    }

    .ktech-quiz-wrapper .ktech-quiz-question-item {
        padding: 16px 14px;
        margin-bottom: 15px;
    }

    .ktech-quiz-wrapper .ktech-quiz-q-text {
        font-size: 14px;
    }

    .ktech-quiz-wrapper .ktech-quiz-option-label {
        padding: 8px 12px;
        font-size: 13.5px;
    }

    .ktech-quiz-wrapper .ktech-quiz-nav-grid {
        gap: 6px;
    }

    .ktech-quiz-wrapper button.ktech-nav-btn,
    .ktech-quiz-wrapper .ktech-nav-btn {
        font-size: 13px;
        border-radius: 6px;
    }

    .ktech-quiz-wrapper .ktech-quiz-nav-legend {
        gap: 16px;
        padding-top: 12px;
        font-size: 12px;
    }

    .ktech-quiz-wrapper .ktech-legend-dot {
        width: 12px;
        height: 12px;
    }
}
