
/*
	Theme Name:	Xtra Child
	Theme URI:	https://www.rtl-theme.com/xtra-corporate-woocommerce-theme/
	Description:Sample child theme of Xtra theme for customization.
	Author:		Xtra Theme
	Author URI:	http://xtratheme.ir
	Template:	xtra
	Version:	1.0.0
*/

/* =========================
   Aani Gateways - Logo next to text + same size + remove duplicate small text
========================= */
.aani-gateway-radio {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aani-gateway-radio:has(input[type="radio"]:checked) {
    border-color: #000;
    background: #fafafa;
}

.aani-gateway-radio input[type="radio"] {
    margin-top: 0 !important;
}

/* ریست span ها (جلوگیری از افتادن متن زیر لوگو) */
.aani-gateway-radio span {
    display: inline !important;
    flex-direction: initial !important;
    gap: 0 !important;
}

/* کانتینر اصلی متن بعد از input */
.aani-gateway-radio > input + span {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

/* ردیف لوگو + عنوان */
.aani-gateway-radio > input + span > span:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

/* لوگوها هم اندازه */
.aani-gateway-radio img {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.aani-gateway-radio > input + span > span:first-child span{
    line-height: 1.15 !important;
}

/* حذف متن تکراری کوچک (11px خاکستری) */
.aani-gateway-radio span[style*="font-size: 11px"],
.aani-gateway-radio span[style*="color:#888"],
.aani-gateway-radio span[style*="color: #888"] {
    display: none !important;
}

/* =========================
   Woo Checkout Payment Layout
========================= */
.woocommerce-checkout ul.wc_payment_methods {
    display: flex !important;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
}

.woocommerce-checkout ul.wc_payment_methods > li {
    width: calc(50% - 5px) !important;
    box-sizing: border-box;
    margin: 0 !important;
}

.woocommerce-checkout ul.wc_payment_methods > li > label.aani-gateway-radio {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .woocommerce-checkout ul.wc_payment_methods > li {
        width: 100% !important;
    }
}

/* =========================
   Global / Misc
========================= */
#tab-additional_information {
    border: 1px solid #ccc;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-sizing: border-box;
}

.codevz-custom-product-meta,
.codevz-custom-product-meta > div {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* اگر نمیخوای hr کلا سایت مخفی بشه، این خط رو حذف کن */
hr {
    display: none;
}

.quantity {
    display: none !important;
}

/* =========================
   Aani Modal - Hide header + hide summary
========================= */
.aani-modal-header,
.aani-modal-header + hr {
    display: none !important;
}

/* مخفی کردن خلاصه مبلغ در مرحله نهایی */
.aani-checkout-form .aani-form-summary,
.aani-fast-checkout-step.step-form.show .aani-form-summary {
    display: none !important;
}

/* =========================
   Spacing fixes (Mobile) - فاصله‌ها زیاد نشه
========================= */
@media (max-width: 768px) {
    .aani-form-row {
        margin-bottom: 8px !important;
    }
    .aani-form-row input,
    .aani-form-row select {
        margin-bottom: 0 !important;
    }
}

/* =========================
   Select state: "انتخاب استان" کامل نمایش داده شود
========================= */
.aani-checkout-form select#aani_state {
    width: 100% !important;
    white-space: normal !important;
    text-overflow: unset !important;
    overflow: visible !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
}

/* =========================
   Hide shipping prices (you asked earlier)
========================= */
.aani-shipping-list .woocommerce-Price-amount {
    display: none !important;
}

/* =========================
   Aani Modal / Mobile base
========================= */
@media (max-width: 600px) {
    .aani-modal-content {
        min-width: 330px !important;
    }

    .aani-checkout-form {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 10px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .aani-checkout-form .aani-form-row input,
    .aani-checkout-form .aani-form-row select {
        padding: 8px 14px;
        border: 1px solid #ddd;
        border-radius: 12px;
        font-size: 16px;
    }
}

/* =========================
   COMPACT FORM (final) - only on step-form
========================= */
.aani-fast-checkout-step.step-form.show {
    padding: 0 !important;
}

.aani-fast-checkout-step.step-form.show .aani-checkout-form {
    padding: 0 6px !important;
    margin: 0 !important;
}

/* ورودی‌ها و سلکت‌ها کمی کوچکتر روی موبایل */
@media (max-width: 768px) {
    .aani-fast-checkout-step.step-form.show .aani-form-row {
        margin-bottom: 6px !important;
    }

    .aani-fast-checkout-step.step-form.show .aani-form-row input,
    .aani-fast-checkout-step.step-form.show .aani-form-row select {
        font-size: 14px !important;
    }

    .aani-fast-checkout-step.step-form.show label {
        font-size: 13px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }

    .aani-fast-checkout-step.step-form.show .aani-gateway-radio {
        padding: 7px 10px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }

    .aani-fast-checkout-step.step-form.show .aani-gateway-radio img {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .aani-fast-checkout-step.step-form.show .aani-form-actions {
        margin-top: 4px !important;
        gap: 8px !important;
    }

    .aani-fast-checkout-step.step-form.show .aani-form-actions button {
        padding: 10px 10px !important;
        font-size: 13.5px !important;
        border-radius: 10px !important;
        line-height: 1.1 !important;
    }
}

/* =========================
   DESKTOP FIXES (and applies to all unless media says)
========================= */

.aani-checkout-form input::placeholder,
.aani-checkout-form textarea::placeholder{
  opacity: 1 !important;
}

/* مودال: تا جای ممکن بدون اسکرول داخلی */
.aani-modal-content {
    max-height: 92vh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* فرم مرحله آخر: اسکرول داخلی نداشته باشد */
.aani-fast-checkout-step.step-form.show .aani-checkout-form {
    max-height: none !important;
    overflow: visible !important;
}

/* روش ارسال: (قبلاً چندستونه بود) */
.aani-fast-checkout-step.step-form.show .aani-shipping-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    flex-direction: row !important;
}

/* دسکتاپ: 3تا در یک ردیف */
@media (min-width: 769px) {
    .aani-fast-checkout-step.step-form.show .aani-shipping-list > label {
        width: calc(33.333% - 6px) !important;
        padding: 6px 10px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        align-items: center !important;
    }
}

/* موبایل: 2تا در یک ردیف */
@media (max-width: 768px) {
    .aani-fast-checkout-step.step-form.show .aani-shipping-list > label {
        width: calc(50% - 4px) !important;
        padding: 4px 8px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        align-items: center !important;
    }
}

/* متن روش ارسال کامل دیده شود (دو خط هم اگر لازم شد مشکلی ندارد) */
.aani-fast-checkout-step.step-form.show .aani-shipping-list > label span {
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* دکمه‌ها جمع‌وجور */
.aani-form-actions {
    margin-top: 6px !important;
    gap: 8px !important;
}

.aani-form-actions button {
    padding: 10px 12px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    line-height: 1.1 !important;
}

/* لیست روش‌های ارسال ستونی شود */
.aani-fast-checkout-step.step-form.show .aani-shipping-list {
    display: flex !important;
    flex-direction: column !important; /* زیر هم */
    gap: 8px !important;
}

/* هر گزینه ارسال */
.aani-fast-checkout-step.step-form.show .aani-shipping-list > label {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

/* SHIPPING TEXT – same size as others, only main text bold */
.aani-fast-checkout-step.step-form.show
.aani-shipping-list > label > span > span:first-child {
    font-weight: 600 !important;   /* بولد ملایم */
    font-size: 13px !important;    /* هم‌سایز بقیه */
    line-height: 1.25 !important;
}

/* =========================================================
   FINAL OVERRIDES (بدون حذف چیزی) - استفاده از فونت و اندازه‌های قالب
   این بخش فقط میاد font-size/font-weight های قبلی رو خنثی می‌کنه
========================================================= */

/* 1) داخل مودال، فونت حتما از قالب ارث ببرد */
.aani-modal-content,
.aani-modal-content *{
  font-family: inherit !important;
}

/* 2) هر font-size/weight که قبلا روی فیلدها/لیبل/دکمه‌ها ست شده بود، از قالب بیاد */
.aani-fast-checkout-step.step-form.show .aani-form-row input,
.aani-fast-checkout-step.step-form.show .aani-form-row select,
.aani-fast-checkout-step.step-form.show label,
.aani-fast-checkout-step.step-form.show .aani-form-actions button{
  font-size: inherit !important;
  font-weight: inherit !important;
}

/* 3) متن روش ارسال: فقط همان متن اصلی کمی بولد (مثل بقیه UI)، بدون بزرگ شدن */
.aani-fast-checkout-step.step-form.show .aani-shipping-list > label > span > span:first-child{
  font-size: inherit !important;     /* هم اندازه بقیه */
  font-weight: 600 !important;      /* فقط بولد ملایم */
}

/* 4) متن درگاه پرداخت: اندازه و وزن از قالب (فقط چیدمان و line-height حفظ می‌شود) */
.aani-gateway-radio > input + span > span:first-child span{
  font-size: inherit !important;
  font-weight: inherit !important;
}
