/**
 * Advanced Assembly Builder - استایل مودال پیش‌فاکتور
 */

.aab-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    font-family: inherit;
}

.aab-quote-modal.active {
    opacity: 1;
    visibility: visible;
}

.aab-quote-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

.aab-quote-modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    transform: translateY(16px) scale(.98);
    transition: transform .25s ease;
    margin: 16px;
}

.aab-quote-modal.active .aab-quote-modal-box {
    transform: translateY(0) scale(1);
}

.aab-quote-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #eef0f2;
}

.aab-quote-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
    font-weight: 700;
}

.aab-quote-modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #8a8f94;
    cursor: pointer;
    padding: 0 4px;
    transition: color .15s ease;
}

.aab-quote-modal-close:hover {
    color: #d63638;
}

.aab-quote-modal-body {
    padding: 20px 22px;
}

.aab-quote-modal-intro {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.9;
    color: #50575e;
}

.aab-quote-form-error {
    background: #fcf0f1;
    border-right: 4px solid #d63638;
    color: #b32d2e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}

.aab-quote-field-row {
    display: flex;
    gap: 12px;
}

.aab-quote-field-row .aab-quote-field {
    flex: 1;
}

.aab-quote-field {
    margin-bottom: 14px;
}

.aab-quote-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 6px;
}

.aab-quote-field label .req {
    color: #d63638;
}

.aab-quote-field input,
.aab-quote-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1d2327;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.aab-quote-field input:focus,
.aab-quote-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, .15);
}

.aab-quote-field textarea {
    resize: vertical;
    min-height: 70px;
}

.aab-quote-modal-footer {
    padding: 16px 22px 22px;
}

.aab-quote-submit-btn {
    width: 100%;
    padding: 13px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.aab-quote-submit-btn:hover {
    background: #135e96;
}

.aab-quote-submit-btn:active {
    transform: translateY(1px);
}

.aab-quote-submit-btn:disabled {
    background: #8aa9c4;
    cursor: not-allowed;
}

/* حالت موفقیت */
.aab-quote-success {
    text-align: center;
    padding: 44px 28px;
}

.aab-quote-success-icon {
    margin-bottom: 16px;
}

.aab-quote-success-icon svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: aab-quote-check .6s ease forwards .1s;
}

@keyframes aab-quote-check {
    to { stroke-dashoffset: 0; }
}

.aab-quote-success h3 {
    margin: 0 0 8px;
    font-size: 19px;
    color: #1e7d34;
    font-weight: 700;
}

.aab-quote-success p {
    margin: 0;
    font-size: 13px;
    color: #50575e;
}

/* موبایل */
@media (max-width: 520px) {
    .aab-quote-field-row {
        flex-direction: column;
        gap: 0;
    }
    .aab-quote-modal-box {
        max-width: 100%;
        margin: 10px;
    }
}
