/* ===========================================
   Aquachem Warranty Form - style.css
   =========================================== */

#aqw-form-wrapper {
    --aqw-navy: #1c2541;
    --aqw-navy-dark: #141b30;
    --aqw-gold: #c9a227;
    --aqw-cream: #faf7f0;
    --aqw-cream-dark: #f5f1e8;
    --aqw-border: #e5e1d8;
    --aqw-teal: #2bb3c0;
    --aqw-text-muted: #8a8a8a;
    --aqw-red: #e24c4c;

    max-width: 1000px;
    margin: 30px auto;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

#aqw-form-wrapper * {
    box-sizing: border-box;
    font-family: inherit;
}

.aqw-wizard-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--aqw-border);
    box-shadow: 0 2px 10px rgba(28, 37, 65, 0.04);
}

/* ===== نوار بالا: آیکون + عنوان + badge ===== */
.aqw-wizard-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px;
    background: #fff;
}

.aqw-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--aqw-cream-dark);
    border: 1px solid var(--aqw-border);
    color: #444;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 30px;
    white-space: nowrap;
}

.aqw-status-badge .aqw-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aqw-teal);
    display: inline-block;
}

.aqw-wizard-title-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.aqw-wizard-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: var(--aqw-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.aqw-wizard-title-text h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--aqw-navy);
}

.aqw-wizard-title-text p {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--aqw-text-muted);
}

/* ===== ردیف ۳ تب ===== */
.aqw-steps-row {
    display: flex;
    width: 100%;
}

.aqw-step-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    background: var(--aqw-cream-dark);
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.25s, color 0.25s;
}

.aqw-step-item.active {
    background: var(--aqw-navy);
    color: #fff;
    font-weight: 700;
}

.aqw-step-circle {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: #e5e1d8;
    color: #9a948a;
}

.aqw-step-item.active .aqw-step-circle {
    background: var(--aqw-gold);
    color: #fff;
}

.aqw-step-item.completed .aqw-step-circle {
    background: #e5e1d8;
    color: var(--aqw-navy);
}

/* ===== نوار پیشرفت ===== */
.aqw-progress-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
    background: #fff;
}

.aqw-progress-label {
    font-size: 12px;
    color: var(--aqw-text-muted);
    white-space: nowrap;
}

.aqw-progress-track {
    flex: 1;
    height: 4px;
    background: #ece7da;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.aqw-progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: var(--aqw-teal);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== بدنه‌ی فرم (پس‌زمینه کرم) ===== */
#aqw-form-new {
    background: var(--aqw-cream);
}

.aqw-wizard-step {
    padding: 28px;
}

/* ===== عنوان بخش ===== */
.aqw-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--aqw-navy);
    margin-bottom: 6px;
}

.aqw-section-title i {
    width: 34px;
    height: 2px;
    background: var(--aqw-gold);
    display: inline-block;
    font-style: normal;
}

.aqw-section-title .aqw-edit-link {
    margin-right: auto;
    font-size: 13px;
    color: var(--aqw-navy);
    text-decoration: none;
    font-weight: 600;
}

.aqw-section-subtitle {
    font-size: 13px;
    color: var(--aqw-text-muted);
    margin: 0 0 24px;
}

/* ===== فیلدها ===== */
.aqw-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.aqw-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.aqw-req {
    color: var(--aqw-red);
    margin-right: 2px;
}

.aqw-field input[type="text"],
.aqw-field input[type="email"],
.aqw-field input[type="file"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--aqw-border);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aqw-field input[type="text"]::placeholder,
.aqw-field input[type="email"]::placeholder {
    color: #b7b1a3;
}

.aqw-field input[type="text"]:focus,
.aqw-field input[type="email"]:focus {
    outline: none;
    border-color: var(--aqw-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.aqw-field small {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    color: #9a948a;
}

.aqw-field-full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

/* ===== فیلد با آیکون (مثلاً ایمیل) ===== */
.aqw-input-icon-wrap {
    position: relative;
}

.aqw-input-icon-wrap .aqw-input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #b7b1a3;
    font-size: 15px;
    pointer-events: none;
}

.aqw-input-icon-wrap input {
    padding-right: 44px;
}

.aqw-input-icon-wrap input[type="email"] {
    direction: ltr;
    text-align: left;
    padding-left: 16px;
}

/* ===== فوتر مراحل (دکمه‌ها) ===== */
.aqw-step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #ece3d2;
    flex-wrap: wrap;
    gap: 14px;
}

.aqw-footer-info {
    font-size: 12px;
    color: var(--aqw-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.aqw-btn-dark,
.aqw-btn-outline,
.aqw-btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.aqw-btn-dark {
    background: var(--aqw-navy);
    color: #fff;
}

.aqw-btn-dark:hover {
    background: var(--aqw-navy-dark);
}

.aqw-btn-dark:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== فیلد کد گارانتی ===== */
#aqw-code-input {
    direction: ltr;
    text-align: left;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.aqw-field-message {
    margin-top: 8px;
    font-size: 12.5px;
    min-height: 16px;
}

.aqw-field-message.aqw-msg-success {
    color: #1a8f5e;
}

.aqw-field-message.aqw-msg-error {
    color: var(--aqw-red);
}

/* فیلدهای readonly (حالت تمدید) */
.aqw-field input.aqw-readonly {
    background: #f1ede2;
    color: #777;
    cursor: not-allowed;
    border-color: #e5e1d8;
}

/* ===== جعبه آپلود تصویر pH ===== */
.aqw-upload-box {
    position: relative;
    border: 2px dashed #d8d2c2;
    border-radius: 12px;
    background: #fdfcf8;
    padding: 32px 20px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.aqw-upload-box:hover {
    border-color: var(--aqw-gold);
    background: #fbf8ef;
}

.aqw-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.aqw-upload-box-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.aqw-upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--aqw-cream-dark);
    color: var(--aqw-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
}

.aqw-upload-box-content strong {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.aqw-upload-box-content small {
    font-size: 12px;
    color: #9a948a;
}

/* ===== دکمه outline (مرحله قبل) ===== */
.aqw-btn-outline {
    background: #fff;
    color: var(--aqw-navy);
    border: 1px solid #d8d2c2 !important;
}

.aqw-btn-outline:hover {
    background: var(--aqw-cream-dark);
}

/* ===== جعبه هشدار بالای تب ۳ ===== */
.aqw-alert-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fbeaea;
    border: 1px solid #f3cccc;
    color: #c0392b;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 24px;
}

.aqw-alert-box .aqw-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ===== کارت خلاصه ===== */
.aqw-summary-card {
    border: 1px solid var(--aqw-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.aqw-summary-row {
    display: flex;
    border-bottom: 1px solid var(--aqw-border);
}

.aqw-summary-row:last-child {
    border-bottom: none;
}

.aqw-summary-row:nth-child(odd) {
    background: #fff;
}

.aqw-summary-row:nth-child(even) {
    background: var(--aqw-cream-dark);
}

.aqw-summary-cell {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aqw-summary-cell:first-child {
    border-left: 1px solid var(--aqw-border);
}

.aqw-summary-cell-full {
    flex: 1 1 100%;
}

.aqw-summary-cell small {
    font-size: 12px;
    color: #9a948a;
}

.aqw-summary-cell strong {
    font-size: 14px;
    color: #222;
    font-weight: 700;
}

/* ===== پیش‌نمایش عکس pH در تب ۳ ===== */
.aqw-mini-preview {
    width: 100%;
    min-height: 90px;
    border: 1px solid var(--aqw-border);
    border-radius: 10px;
    background: #fdfcf8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.aqw-mini-preview img {
    max-width: 140px;
    max-height: 140px;
    border-radius: 8px;
    object-fit: cover;
}

.aqw-mini-preview:empty::before {
    content: "تصویری انتخاب نشده است";
    font-size: 12.5px;
    color: #b7b1a3;
}

/* ===== چک‌باکس سفارشی ===== */
.aqw-checkbox-row {
    margin-bottom: 16px;
}

.aqw-custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13.5px;
    color: #333;
    line-height: 1.8;
}

.aqw-custom-checkbox input[type="checkbox"] {
    display: none;
}

.aqw-checkbox-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid #cfc8b8;
    border-radius: 5px;
    background: #fff;
    position: relative;
    margin-top: 2px;
    transition: background 0.2s, border-color 0.2s;
}

.aqw-custom-checkbox input[type="checkbox"]:checked + .aqw-checkbox-box {
    background: var(--aqw-navy);
    border-color: var(--aqw-navy);
}

.aqw-custom-checkbox input[type="checkbox"]:checked + .aqw-checkbox-box::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 6px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.aqw-checkbox-label a {
    color: var(--aqw-navy);
    font-weight: 700;
    text-decoration: underline;
}

.aqw-checkbox-warning {
    margin-top: 8px;
    margin-right: 32px;
    font-size: 12.5px;
    color: var(--aqw-red);
    font-weight: 600;
}

/* ===== دکمه نهایی طلایی ===== */
.aqw-btn-gold {
    background: var(--aqw-gold);
    color: #fff;
}

.aqw-btn-gold:hover {
    background: #b8911f;
}

.aqw-btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================================
   صفحه نهایی بعد از ثبت موفق
   =========================================== */

#aqw-final-message.aqw-wizard-card {
    position: relative;
    overflow: hidden;
}

#aqw-final-message.aqw-wizard-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: var(--aqw-navy);
    border-radius: 16px 16px 0 0;
}

.aqw-final-box {
    position: relative;
    text-align: center;
    padding: 60px 30px 50px;
    background-image:
        linear-gradient(to left, rgba(28, 37, 65, 0.035) 1px, transparent 1px),
        linear-gradient(to top, rgba(28, 37, 65, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}

.aqw-final-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e6f6f7;
    color: var(--aqw-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 18px;
    border: 1px solid #cdeef1;
}

.aqw-final-box h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 14px;
}

.aqw-final-box p {
    font-size: 13.5px;
    color: #7a7a7a;
    max-width: 480px;
    margin: 0 auto;
    line-height: 2;
}

/* ===== ریسپانسیو (موبایل) ===== */
@media (max-width: 680px) {
    .aqw-wizard-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .aqw-step-item {
        font-size: 12px;
        padding: 14px 8px;
        gap: 6px;
    }

    .aqw-step-text {
        display: none;
    }

    .aqw-fields-grid {
        grid-template-columns: 1fr;
    }

    .aqw-summary-row {
        flex-direction: column;
    }

    .aqw-summary-cell:first-child {
        border-left: none;
        border-bottom: 1px solid var(--aqw-border);
    }

    .aqw-step-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .aqw-btn-dark,
    .aqw-btn-outline,
    .aqw-btn-gold {
        width: 100%;
        justify-content: center;
    }
}