/* کانتینر اصلی آزمون */
.pte-test-container {
    direction: rtl;
    max-width: 920px;
    margin: 35px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 35px rgba(38, 45, 74, 0.09);
    color: #24283b;
    font-family: inherit;
}

/* نوار پیشرفت */
.pte-progress-wrapper {
    position: relative;
    height: 12px;
    margin: 0 0 35px;
    background: #edf0f7;
    border-radius: 20px;
    overflow: visible;
}

.pte-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #7657d9, #a77be8);
    border-radius: 20px;
    transition: width 0.4s ease;
}

#pteProgressText {
    display: block;
    margin-top: 12px;
    color: #6d7287;
    font-size: 13px;
    text-align: left;
}

/* مراحل فرم */
.pte-step {
    display: none;
    animation: pteFadeIn 0.3s ease;
}

.pte-step.active-step {
    display: block;
}

@keyframes pteFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pte-step-title {
    margin: 0 0 12px;
    color: #30245c;
    font-size: 24px;
    font-weight: 700;
}

.pte-step > p {
    margin-bottom: 25px;
    color: #70758a;
    line-height: 1.9;
}

/* گروه فیلدها */
.pte-form-group {
    margin-bottom: 22px;
}

.pte-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #35394c;
    font-size: 14px;
    font-weight: 600;
}

.pte-form-control,
.pte-form-group input,
.pte-form-group select,
.pte-form-group textarea,
.form-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid #dfe2ec;
    border-radius: 10px;
    background: #fafbfe;
    color: #25283a;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pte-form-group input:focus,
.pte-form-group select:focus,
.pte-form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #8061dc;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(128, 97, 220, 0.12);
}

/* کارت سوال */
.pte-question-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid #e8eaf1;
    border-radius: 15px;
    background: #fcfcfe;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pte-question-card:hover {
    border-color: #cfc5f3;
    box-shadow: 0 4px 18px rgba(62, 45, 125, 0.06);
}

.pte-question-text {
    margin: 0 0 20px;
    color: #292d42;
    font-size: 16px;
    font-weight: 600;
    line-height: 2;
}

.pte-q-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin-left: 8px;
    border-radius: 50%;
    background: #8061dc;
    color: #ffffff;
    font-size: 13px;
}

/* گزینه‌ها */
.pte-options-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.pte-option-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 10px 6px;
    border: 1px solid #e0e2eb;
    border-radius: 10px;
    background: #ffffff;
    color: #555a70;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
    transition: all 0.2s ease;
}

.pte-option-label:hover {
    border-color: #8061dc;
    color: #6045b9;
    background: #f8f6ff;
}

.pte-option-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pte-custom-radio {
    position: relative;
    display: block;
    width: 17px;
    height: 17px;
    margin-bottom: 5px;
    border: 2px solid #bfc3d2;
    border-radius: 50%;
}

.pte-option-label input:checked + .pte-custom-radio {
    border-color: #8061dc;
    background: #8061dc;
}

.pte-option-label input:checked + .pte-custom-radio::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
}

.pte-option-label:has(input:checked) {
    border-color: #8061dc;
    background: #f4f1ff;
    color: #6045b9;
    box-shadow: 0 3px 10px rgba(128, 97, 220, 0.12);
}

/* دکمه‌های پیمایش */
.pte-form-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
}

.pte-next-btn,
.pte-prev-btn,
.pte-submit-btn {
    min-width: 135px;
    min-height: 46px;
    padding: 11px 22px;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pte-next-btn,
.pte-submit-btn {
    background: linear-gradient(135deg, #8061dc, #6345b8);
    color: #ffffff;
}

.pte-next-btn:hover,
.pte-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(99, 69, 184, 0.25);
}

.pte-prev-btn {
    border: 1px solid #dfe1ea;
    background: #ffffff;
    color: #606579;
}

.pte-prev-btn:hover {
    border-color: #8061dc;
    color: #6045b9;
}

/* خطاهای اعتبارسنجی */
.pte-invalid {
    border-color: #dc5263 !important;
}

.pte-question-card.pte-invalid {
    box-shadow: 0 0 0 3px rgba(220, 82, 99, 0.1);
}

.pte-field-error {
    display: block;
    margin-top: 7px;
    color: #d74458;
    font-size: 12px;
}

/* حالت بارگذاری */
.pte-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* موبایل */
@media (max-width: 700px) {
    .pte-test-container {
        margin: 20px 10px;
        padding: 17px;
        border-radius: 13px;
    }

    .pte-step-title {
        font-size: 20px;
    }

    .pte-question-card {
        padding: 16px;
    }

    .pte-options-group {
        grid-template-columns: 1fr;
    }

    .pte-option-label {
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        min-height: auto;
        padding: 12px;
        text-align: right;
    }

    .pte-custom-radio {
        flex: 0 0 auto;
        margin: 0;
    }

    .pte-form-navigation {
        flex-wrap: wrap;
    }

    .pte-next-btn,
    .pte-prev-btn,
    .pte-submit-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}
.pte-success-message {
    padding: 20px;
    background-color: #d4edda;
    color: #155724;
    border-right: 5px solid #28a745;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    margin-top: 20px;
}

.pte-error-message {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border-right: 5px solid #dc3545;
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
    margin-top: 20px;
}
