/* ============================================================
 *  מערכת הסיכומים המותאמים אישית (CSU/FCS) — עיצובי צד הסטודנט
 *  נטען רק בעמוד מבחן בודד (is_singular('quiz')) דרך quiz-student.php
 * ============================================================ */

/* ---- כרטיס ההצעה (הכפתור + ההסבר) שמופיע בסיכום התוצאות ---- */
.ashbar-quiz-csu-offer {
    margin: 18px 0;
    padding: 18px 20px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #f5f9ff;
    text-align: center;
    direction: rtl;
}

.ashbar-quiz-csu-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ashbar-quiz-csu-btn:hover {
    background: #1d4ed8;
}

.ashbar-quiz-csu-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.ashbar-quiz-csu-desc {
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

/* ---- ה-FCS: הסיכום המותאם המלא ---- */
.ashbar-quiz-fcs {
    margin: 22px 0;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    color: #1f2937;
}

/* כל CSU הוא יחידה נושאית עם רווח ביניהן */
.ashbar-quiz-fcs-unit {
    margin: 0 0 30px;
}

.ashbar-quiz-fcs-unit:last-child {
    margin-bottom: 0;
}

/*
 * הכותרת הראשית של כל CSU (H2) מקבלת רקע מובחן מהרקע הרגיל,
 * כך שכל יחידה נושאית בולטת ויזואלית ומחלקת את הסיכום למקטעים ברורים.
 */
.ashbar-quiz-fcs-unit h2 {
    background: #eef4ff;
    color: #1e3a8a;
    padding: 12px 16px;
    margin: 0 0 14px;
    border-radius: 8px;
    border-right: 5px solid #2563eb;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.ashbar-quiz-fcs-unit h3 {
    color: #1e3a8a;
    font-size: 17px;
    font-weight: 700;
    margin: 20px 0 8px;
}

.ashbar-quiz-fcs-unit h4,
.ashbar-quiz-fcs-unit h5,
.ashbar-quiz-fcs-unit h6 {
    color: #334155;
    margin: 16px 0 6px;
}

.ashbar-quiz-fcs-unit p {
    margin: 0 0 12px;
}

.ashbar-quiz-fcs-unit ul,
.ashbar-quiz-fcs-unit ol {
    margin: 0 0 14px;
    padding-right: 24px;
    padding-left: 0;
}

.ashbar-quiz-fcs-unit li {
    margin: 0 0 6px;
}

.ashbar-quiz-fcs-unit a {
    color: #2563eb;
}

/* ---- תיבת ההורדה (מעל ה-FCS): כחול על רקע לבן — בולט מספיק אך לא מאיים ---- */
.ashbar-quiz-fcs-download {
    margin: 18px 0;
    padding: 18px 20px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-right: 5px solid #2563eb; /* פס כחול מובחן (RTL) */
    text-align: center;
    direction: rtl;
}

.ashbar-quiz-fcs-download__text {
    margin: 0 0 14px;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.6;
}

.ashbar-quiz-fcs-download__btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.15s ease;
}

.ashbar-quiz-fcs-download__btn:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ============================================================
 *  שער התשלום (טופס ה-PayPal באותו עמוד)
 * ============================================================ */

.ashbar-quiz-csu-wrap {
    margin: 18px 0;
    direction: rtl;
}

/* שורת המחיר בכרטיס ההצעה */
.ashbar-quiz-csu-price {
    margin: 12px 0 0;
    color: #1e3a8a;
    font-size: 16px;
    font-weight: 700;
}

/* מעטפת טופס התשלום — כרטיס תואם לכרטיס ההצעה */
.ashbar-quiz-payment {
    margin: 18px 0;
    padding: 20px 22px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #f5f9ff;
    direction: rtl;
    text-align: right;
}

.ashbar-quiz-payment-step {
    margin: 0;
}

/* כותרת טופס התשלום — ממורכזת, גודל טקסט רגיל */
.ashbar-quiz-payment-title {
    margin: 0 0 16px;
    text-align: center;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
}

.ashbar-quiz-payment-label {
    display: block;
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
}

.ashbar-quiz-payment-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}

.ashbar-quiz-payment-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* שדות מספריים (כרטיס/תוקף/CVV ב-honeypot) — LTR */
.ashbar-quiz-payment-input-ltr {
    direction: ltr;
    text-align: left;
}

.ashbar-quiz-payment-input-half {
    width: calc(50% - 5px);
    display: inline-block;
}

.ashbar-quiz-payment-input-half + .ashbar-quiz-payment-input-half {
    margin-right: 10px;
}

.ashbar-quiz-payment-help {
    margin: 6px 0 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.ashbar-quiz-payment-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
}

.ashbar-quiz-payment-terms-cb {
    margin-top: 3px;
    flex: 0 0 auto;
}

.ashbar-quiz-payment-terms a {
    color: #2563eb;
}

.ashbar-quiz-payment-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border-right: 4px solid #dc2626;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

/* כפתור "הבא" / "שלם עכשיו" */
.ashbar-quiz-payment-next {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 26px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ashbar-quiz-payment-next:hover {
    background: #1d4ed8;
}

/* כפתור "הבא" בשלב 1 — מוצמד לשמאל (לא רוחב מלא). שאר הטופס ללא שינוי */
.ashbar-quiz-payment-form1 .ashbar-quiz-payment-next {
    display: block;
    width: fit-content;
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* שורת המחיר בשלב 2 */
.ashbar-quiz-payment-price {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #eef4ff;
    border-radius: 8px;
    border-right: 5px solid #2563eb;
    color: #1e3a8a;
    font-size: 17px;
    font-weight: 700;
}

.ashbar-quiz-payment-price-label {
    margin-left: 6px;
}

/* שדה הת.ז. */
.ashbar-quiz-payment-id-wrap {
    margin: 0 0 14px;
}

.ashbar-quiz-payment-user-id {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    direction: ltr;
    text-align: center;
}

.ashbar-quiz-payment-user-id:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.ashbar-quiz-payment-user-id-error {
    display: block;
    margin-top: 6px;
    color: #991b1b;
    font-size: 13px;
}

/* מכל כפתורי PayPal — מושבת עד שה-ת.ז. תקינה (ה-JS משנה opacity/pointer-events) */
.ashbar-quiz-paypal-button-container {
    margin-top: 6px;
    pointer-events: none;
    opacity: 0.4;
}

/* שכבת "מעבד תשלום" — מכסה את כל ה-viewport */
.ashbar-quiz-payment-processing {
    position: fixed;
    inset: 0;
    z-index: 999999;
    /* display מתחלף בין noneל-flex דרך ה-JS */
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
}

.ashbar-quiz-payment-processing-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px 36px;
    text-align: center;
    max-width: 90%;
    direction: rtl;
}

.ashbar-quiz-payment-processing-text {
    margin: 16px 0 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.ashbar-quiz-payment-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ashbar-quiz-spin 0.8s linear infinite;
}

@keyframes ashbar-quiz-spin {
    to { transform: rotate(360deg); }
}
