/* تعریف متغیرهای قابل تغییر توسط مدیر سایت */
:root {
    --tiyan-primary-color: #0052cc;
    --tiyan-bg-color: #ffffff;
    --tiyan-text-color: #333333;
    --tiyan-border-radius: 12px;
    --tiyan-font-family: inherit; /* ارث‌بری فونت سایت برای یکپارچگی متنی */
}

/* لایه تاریک پس‌زمینه (Overlay) */
.tiyan-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: none; /* پنهان به صورت پیش‌فرض */
    justify-content: center;
    align-items: center;
    direction: rtl;
    font-family: var(--tiyan-font-family);
}

.tiyan-popup-overlay.active {
    display: flex;
}

/* کانتینر اصلی پاپ‌آپ */
.tiyan-popup-container {
    background-color: var(--tiyan-bg-color);
    width: 100%;
    max-width: 600px;
    border-radius: var(--tiyan-border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--tiyan-text-color);
}

/* دکمه بستن */
.tiyan-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

/* استایل بدنه و محتوا */
.tiyan-popup-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.tiyan-popup-title {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.tiyan-popup-body {
    padding: 20px;
}

/* مدیریت نمایش مراحل */
.tiyan-step-content {
    display: none;
}
.tiyan-step-content.active {
    display: block;
}

/* استایل دکمه‌ها */
.tiyan-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--tiyan-border-radius);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.3s;
}

.tiyan-btn-primary {
    background-color: var(--tiyan-primary-color);
    color: #fff;
}
.tiyan-btn-primary:hover {
    opacity: 0.9;
}





/* استایل‌های فرم مرحله دوم */
.tiyan-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.tiyan-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.tiyan-form-group label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.tiyan-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.tiyan-input:focus {
    border-color: var(--tiyan-primary-color);
    outline: none;
}

.tiyan-textarea {
    resize: vertical;
    min-height: 80px;
}

/* استایل بخش روش‌های پرداخت */
.tiyan-payment-methods {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.tiyan-payment-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

.tiyan-radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.tiyan-radio-label input[type="radio"] {
    margin-left: 10px;
    accent-color: var(--tiyan-primary-color);
}

.tiyan-radio-text {
    font-size: 14px;
}

/* دکمه‌های پایین فرم */
.tiyan-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tiyan-btn-secondary {
    background-color: #f1f1f1;
    color: #555;
}

.tiyan-btn-secondary:hover {
    background-color: #e2e2e2;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 600px) {
    .tiyan-form-row {
        flex-direction: column;
        gap: 0;
    }
}