/*
 * SuppliersCentral Core Frontend Styles
 * (نسخه نهایی - بر اساس ساختار <p> اصلی و کارا)
 */

/* ---------------------------------- */
/* ۱. Wrapper اصلی (گام ۱، ۲ و ۳) */
/* ---------------------------------- */
.scc-flow-wrapper {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* ---------------------------------- */
/* ۲. استایل فیلدهای اصلی (داخل <p>) */
/* ---------------------------------- */
.scc-flow-wrapper p {
    margin-bottom: 25px; /* فاصله بین هر فیلد */
}

/* لیبل‌های بالای فیلدها */
.scc-flow-wrapper p > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

/* ستاره فیلدهای ضروری */
.scc-flow-wrapper label span.scc-required {
    color: #d9534f;
    margin-left: 4px;
    font-weight: bold;
}

/* ---------------------------------- */
/* ۳. استایل فیلدهای ورودی */
/* ---------------------------------- */
/* * ما دیگر به select استایل نمی‌دهیم
 * تا به قالب اجازه دهیم آن را به درستی (Select2) زیباسازی کند.
*/
.scc-flow-wrapper p input[type="text"],
.scc-flow-wrapper p input[type="email"],
.scc-flow-wrapper p input[type="password"],
.scc-flow-wrapper p input[type="url"],
.scc-flow-wrapper p input[type="number"],
.scc-flow-wrapper p textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 16px;
    background: #f9f9f9;
}

/* استایل فیلد فایل (اصلاح شده) */
.scc-flow-wrapper p input[type="file"] {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f9f9f9;
    box-sizing: border-box; 
    font-size: 16px;
    color: #555;
}

.scc-flow-wrapper p input[type="file"]::file-selector-button {
    margin-right: 15px;
    border: none;
    background: #F69B28;
    padding: 12px 15px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: -1px;
    margin-bottom: -1px;
    margin-left: -1px; 
}
.scc-flow-wrapper p input[type="file"]::file-selector-button:hover {
    background: #333;
}


/* افکت Focus */
.scc-flow-wrapper p input:focus,
.scc-flow-wrapper p textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
    background: #fff;
    outline: none;
}

/* ---------------------------------- */
/* ۴. استایل Radio Button ها (کد اصلی شما) */
/* ---------------------------------- */
.scc-flow-wrapper p.scc-radio-group {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 5px;
    background: #fafafa;
}

.scc-flow-wrapper p.scc-radio-group span.scc-radio-title {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.scc-flow-wrapper p.scc-radio-group label {
    display: inline-block !important; /* از کد اصلی شما - مهم است */
    margin-right: 25px !important;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.scc-flow-wrapper p.scc-radio-group label input[type="radio"] {
    margin-right: 8px;
    vertical-align: -2px;
    width: auto; /* لغو عرض ۱۰۰٪ */
}

/* ---------------------------------- */
/* ۵. دکمه Submit (برای گام ۱ و ۲) */
/* ---------------------------------- */
.scc-flow-wrapper p button[type="submit"] {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #F69B28;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.scc-flow-wrapper p button[type="submit"]:hover {
    background-color: #005a87;
}

/* ---------------------------------- */
/* ۶. استایل‌های کمکی (برای گام ۲) */
/* ---------------------------------- */
.scc-field-description {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    font-style: italic;
}
.scc-summary-note {
    font-size: 16px;
    padding: 15px;
    background: #f4f8fa;
    border: 1px solid #cce0eb;
    border-radius: 5px;
    margin-bottom: 25px;
}
.scc-form-footer-nav {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: center;
}

/* ---------------------------------- */
/* ۷. استایل گام ۳ (باکس‌های انتخاب پلن) */
/* (این کدها صحیح بودند و باقی می‌مانند) */
/* ---------------------------------- */
.scc-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.scc-package-item {
    position: relative;
}
.scc-package-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* * اینجا "label" را هدف می‌گیریم، چون HTML گام ۳
 * به درستی از <label> به عنوان باکس استفاده می‌کند
*/
.scc-package-item label {
    display: block;
    padding: 25px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.scc-package-item label:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.scc-package-item input[type="radio"]:checked + label {
    border-color: #0073aa;
    background: #f4f8fa;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.15);
}
.scc-package-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #222;
}
.scc-package-item .scc-price {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 15px;
}
.scc-package-item .scc-price del {
    font-size: 0.6em;
    color: #999;
    font-weight: normal;
    margin-left: 8px;
}
.scc-package-item ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 15px;
    color: #555;
}
.scc-package-item ul li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 8px;
}
.scc-package-item ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #5cb85c;
    font-weight: bold;
    font-size: 1.2em;
}
@media (max-width: 768px) {
    .scc-packages-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------- */
/* ۸. پیام‌های خطا و موفقیت */
/* ---------------------------------- */
.scc-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid;
}
.scc-notice-error {
    background: #fdf7f7;
    border-color: #d9534f;
    color: #b94a48;
}
.scc-notice-success {
    background: #f4fdf7;
    border-color: #5cb85c;
    color: #3c763d;
}

/* ---------------------------------- */
/* ۷. استایل‌های کمکی (برای گام ۲ و ۳) */
/* ---------------------------------- */

/* توضیحات زیر فیلدها (مثل ایمیل و پسورد) */
.scc-field-description {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    font-style: italic;
}

/* متن خلاصه (مثال: شما در حال ثبت نام برای شرکت X هستید) */
.scc-summary-note {
    font-size: 16px;
    padding: 15px;
    background: #f4f8fa;
    border: 1px solid #cce0eb;
    border-radius: 5px;
    margin-bottom: 25px;
}

/* لینک "بازگشت به مرحله قبل" */
.scc-form-footer-nav {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: center;
}

.scc-form-footer-nav a {
    color: #0073aa;
    text-decoration: none;
    font-size: 15px;
}
.scc-form-footer-nav a:hover {
    text-decoration: underline;
}




/* ---------------------------------- */
/* ۸. اصلاحات تداخل با قالب (Theme) */
/* ---------------------------------- */

/* * رفع مشکل مخفی بودن فیلد Select (Type of Supplier)
 * ما از یک سلکتور قوی‌تر استفاده می‌کنیم و
 * ظاهر (appearance) آن را به حالت پیش‌فرض مرورگر برمی‌گردانیم
 * تا مطمئن شویم که پس‌زمینه و رنگ متن آن درست است.
*/
.scc-flow-wrapper .scc-form-group select#scc-supplier-type {
    appearance: menulist !important; /* وادار کردن به نمایش منوی کشویی */
    -webkit-appearance: menulist !important;
    background: #f9f9f9 !important; /* وادار کردن به نمایش پس‌زمینه */
    color: #333 !important; /* وادار کردن به نمایش متن */
    padding: 12px 15px !important; /* اطمینان از پدینگ صحیح */
}



/* ---------------------------------- */
/* ۹. اصلاحیه برای تداخل Select2 قالب */
/* ---------------------------------- */

/* * این کد کانتینر Select2 که جایگزین فیلد ما شده را هدف می‌گیرد
*/

/* ۱. تنظیم کانتینر اصلی Select2 */
.scc-form-group .select2-container {
    width: 100% !important; /* وادار کردن به عرض کامل */
    padding: 0;
    margin: 0;
}

/* ۲. استایل فیلد اصلی (که شبیه input است) */
.scc-form-group .select2-container .select2-selection--single {
    height: auto !important; /* اجازه بده پدینگ ارتفاع را تعیین کند */
    padding: 12px 15px !important; /* هماهنگ با بقیه فیلدها */
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    background: #f9f9f9 !important;
    font-size: 16px !important;
}

/* ۳. استایل متنی که انتخاب شده */
.scc-form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    line-height: inherit !important; /* جلوگیری از بهم ریختگی تراز عمودی */
    padding-left: 0 !important;
}

/* ۴. استایل فلش (Arrow) کنار فیلد */
.scc-form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 10px !important;
    width: 15px !important;
}



/* ---------------------------------- */
/* ۹. اصلاحیه برای تداخل Select2 قالب */
/* ---------------------------------- */
.scc-form-group .select2-container {
    width: 100% !important; 
}
.scc-form-group .select2-container .select2-selection--single {
    height: auto !important;
    padding: 12px 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    background: #f9f9f9 !important;
    font-size: 16px !important;
    box-shadow: none !important;
}
.scc-form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    line-height: inherit !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
}
.scc-form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 10px !important;
}



/* ---------------------------------- */
/* ۱۰. استایل گام ۳ (باکس‌های انتخاب پلن) */
/* ---------------------------------- */

/* ۱. گرید (Grid) برای نگهداری باکس‌ها */
.scc-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* دو ستونه در دسکتاپ */
    gap: 20px;
    margin-bottom: 30px;
}

/* ۲. آیتم اصلی پکیج (کانتینر) */
.scc-package-item {
    position: relative; /* برای مخفی کردن دکمه رادیویی */
}

/* ۳. مخفی کردن دکمه رادیویی اصلی */
.scc-package-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ۴. استایل باکس (لیبل) */
.scc-package-item label { /* مستقیم خود تگ label را هدف می‌گیریم */
    display: block;
    padding: 25px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.scc-package-item label:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ۵. استایل حالت انتخاب شده (مهم‌ترین بخش) */
.scc-package-item input[type="radio"]:checked + label {
    border-color: #0073aa; /* رنگ اصلی ووردپرس */
    background: #f4f8fa; /* پس‌زمینه آبی بسیار روشن */
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.15);
}

/* ۶. استایل محتوای داخل باکس */
.scc-package-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #222;
}

.scc-package-item .scc-price {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 15px;
}

/* استایل قیمت خط خورده (برای تخفیف) */
.scc-package-item .scc-price del {
    font-size: 0.6em;
    color: #999;
    font-weight: normal;
    margin-left: 8px;
}

.scc-package-item ul {
    list-style: none; /* حذف دایره‌ها */
    padding-left: 0;
    margin: 0;
    font-size: 15px;
    color: #555;
}

.scc-package-item ul li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 8px;
}

/* اضافه کردن تیک (✓) به آیتم‌های لیست */
.scc-package-item ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #5cb85c; /* سبز */
    font-weight: bold;
    font-size: 1.2em;
}

/* ۷. ریسپانسیو کردن گرید */
@media (max-width: 768px) {
    .scc-packages-grid {
        grid-template-columns: 1fr; /* تک ستونه در موبایل */
    }
}


.scc-form-group .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999 !important; /* رنگ خاکستری قابل مشاهده */
    opacity: 1 !important; /* کاملاً قابل مشاهده (نه شفاف) */
}