/* =========================================================
   TaminYar BUY V6
   Desktop:
   Plans full width
   Form + Important notes side by side

   Mobile:
   Completely responsive
   No horizontal scrolling
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}


/* =========================================================
   BASE
   ========================================================= */

.checkout-section {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.checkout-section .checkout-layout {
  width: calc(100% - 40px);
  max-width: 1180px;

  margin-right: auto;
  margin-left: auto;

  padding: 0;

  display: grid;

  /*
   * ستون راست بزرگ‌تر برای فرم
   * ستون چپ برای نکات مهم
   */
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, .55fr);

  gap: 22px;

  align-items: start;
}

.checkout-layout > * {
  min-width: 0;
  max-width: 100%;
}


/* =========================================================
   STEP 1 - PLAN
   بالا و تمام عرض
   ========================================================= */

.checkout-card:first-child {
  grid-column: 1 / -1 !important;

  width: 100%;
  max-width: 100%;
}


/* =========================================================
   STEP 2 - FORM
   ========================================================= */

.checkout-card:nth-child(2) {
  grid-column: 1 !important;
  grid-row: 2 !important;

  width: 100%;
  max-width: 100%;
}


/* =========================================================
   IMPORTANT SUBSCRIPTION NOTES
   کنار فرم در دسکتاپ
   ========================================================= */

.checkout-assurance {
  grid-column: 2 !important;
  grid-row: 2 !important;

  width: 100% !important;
  max-width: 100% !important;

  margin: 0 !important;

  /*
   * هنگام پایین رفتن فرم،
   * نکات مهم در دید کاربر باقی می‌ماند.
   */
  position: sticky;
  top: 100px;

  align-self: start;
}

.checkout-assurance h2 {
  margin-top: 0;
}

.checkout-assurance ol {
  margin-bottom: 0;
}


/* =========================================================
   PLAN PICKER
   ========================================================= */

.plan-picker {
  width: 100%;
  max-width: 100%;

  display: grid;
  gap: 18px;
}

.plan-tier-grid {
  display: grid !important;

  grid-template-columns:
    repeat(3, minmax(0, 1fr)) !important;

  width: 100% !important;
  max-width: 100% !important;

  gap: 14px !important;

  padding: 0 !important;
  margin: 0 !important;

  overflow: visible !important;
  overflow-x: visible !important;

  scroll-snap-type: none !important;
}

.plan-tier-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  scroll-snap-align: none !important;
}


/* configurator */

.plan-configurator {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  height: auto !important;
  min-height: 0 !important;
}

.plan-overview,
.plan-duration-panel {
  min-width: 0;
  max-width: 100%;

  height: auto !important;
  min-height: 0 !important;
}


/* =========================================================
   FORM SAFETY
   ========================================================= */

.checkout-card form,
.checkout-card fieldset,
.checkout-card label,
.checkout-card input,
.checkout-card select,
.checkout-card textarea,
.checkout-summary {
  min-width: 0;
  max-width: 100%;
}

.checkout-card input,
.checkout-card select,
.checkout-card textarea {
  width: 100%;
}

.checkout-submit {
  width: 100%;
  max-width: 100%;

  justify-content: center;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .checkout-section .checkout-layout {
    width: calc(100% - 30px);

    grid-template-columns: 1fr;
    gap: 16px;
  }

  .checkout-card:first-child,
  .checkout-card:nth-child(2),
  .checkout-assurance {
    grid-column: 1 !important;
  }

  .checkout-card:first-child {
    grid-row: 1 !important;
  }

  .checkout-card:nth-child(2) {
    grid-row: 2 !important;
  }

  .checkout-assurance {
    grid-row: 3 !important;

    position: static !important;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

  html,
  body {
    width: 100%;
    max-width: 100%;

    overflow-x: hidden !important;
  }


  /* Hero */

  .checkout-hero {
    padding-top: 24px !important;
    padding-bottom: 18px !important;
  }

  .checkout-hero .container {
    width: calc(100% - 24px) !important;

    margin-right: auto !important;
    margin-left: auto !important;
  }


  /* Main layout */

  .checkout-section {
    padding-top: 14px !important;
    padding-bottom: 28px !important;
  }

  .checkout-section .checkout-layout {
    display: flex !important;
    flex-direction: column !important;

    width: calc(100% - 20px) !important;
    max-width: 520px !important;

    margin-right: auto !important;
    margin-left: auto !important;

    padding: 0 !important;

    gap: 12px !important;

    overflow: visible !important;
  }


  /* Cards */

  .checkout-card,
  .checkout-assurance {
    position: static !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;

    padding: 14px !important;

    border-radius: 17px !important;

    overflow: hidden !important;
  }


  /* Heading */

  .checkout-heading {
    margin-bottom: 14px !important;

    gap: 9px !important;
  }

  .checkout-heading h2 {
    font-size: 17px !important;
    line-height: 1.6 !important;
  }

  .checkout-heading p {
    font-size: 11px !important;
    line-height: 1.8 !important;
  }

  .checkout-step {
    width: 31px !important;
    height: 31px !important;

    border-radius: 10px !important;
  }


  /* -----------------------------------------
     Plan heading
     ----------------------------------------- */

  .plan-picker {
    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

    gap: 12px !important;
  }

  .plan-picker-label {
    flex-direction: column !important;

    align-items: flex-start !important;

    gap: 3px !important;
  }

  .plan-picker-label > span {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }

  .plan-picker-label > small {
    font-size: 10px !important;
    line-height: 1.8 !important;
  }


  /* =====================================================
     سه پلن موبایل
     بدون اسکرول افقی
     ===================================================== */

  .plan-tier-grid {
    display: grid !important;

    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;

    width: 100% !important;
    max-width: 100% !important;

    gap: 6px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
    overflow-x: visible !important;

    scroll-snap-type: none !important;
  }

  .plan-tier-card {
    position: relative !important;

    display: flex !important;
    flex-direction: column !important;

    align-items: center !important;

    width: 100% !important;
    min-width: 0 !important;

    min-height: 116px !important;
    height: auto !important;

    padding: 10px 5px 8px !important;

    gap: 6px !important;

    border-radius: 14px !important;

    text-align: center !important;

    transform: none !important;

    overflow: hidden !important;
  }

  .plan-tier-card:hover,
  .plan-tier-card.is-active {
    transform: none !important;
  }


  /* Icon */

  .plan-tier-icon {
    width: 36px !important;
    height: 36px !important;

    flex: 0 0 36px !important;

    border-radius: 11px !important;
  }

  .plan-tier-icon svg {
    width: 20px !important;
    height: 20px !important;
  }


  /* Name */

  .plan-tier-copy {
    width: 100% !important;

    align-items: center !important;
  }

  .plan-tier-copy strong {
    width: 100% !important;

    font-size: 10px !important;
    line-height: 1.55 !important;

    text-align: center !important;

    white-space: normal !important;
  }

  /*
   * توضیح طولانی از کارت کوچک حذف می‌شود.
   * پایین صفحه در پلن انتخاب‌شده کامل هست.
   */
  .plan-tier-copy small {
    display: none !important;
  }


  /* Price */

  .plan-tier-price {
    width: 100% !important;

    justify-content: center !important;

    margin-top: auto !important;

    padding-top: 6px !important;

    text-align: center !important;
  }

  .plan-tier-price small {
    display: none !important;
  }

  .plan-tier-price b {
    font-size: 9px !important;
    line-height: 1.45 !important;

    white-space: normal !important;
  }


  /* Check */

  .plan-tier-check {
    top: 4px !important;
    left: 4px !important;

    width: 16px !important;
    height: 16px !important;

    font-size: 8px !important;
  }


  /* Popular */

  .plan-popular-badge {
    max-width: 72% !important;

    padding: 2px 4px !important;

    font-size: 6.5px !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }


  /* =====================================================
     Selected plan details
     ===================================================== */

  .plan-configurator {
    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    gap: 13px !important;

    padding: 13px !important;

    border-radius: 17px !important;

    overflow: hidden !important;
  }

  .plan-overview {
    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    padding: 0 !important;
  }

  .plan-overview-head {
    display: grid !important;

    grid-template-columns:
      43px minmax(0, 1fr) !important;

    align-items: start !important;

    gap: 9px !important;
  }

  .plan-overview-icon {
    width: 43px !important;
    height: 43px !important;

    border-radius: 13px !important;
  }

  .plan-overview-icon svg {
    width: 23px !important;
    height: 23px !important;
  }

  .plan-overview h3 {
    margin: 5px 0 2px !important;

    font-size: 17px !important;
  }

  .plan-overview p {
    font-size: 10.5px !important;
    line-height: 1.8 !important;
  }

  .plan-cta-phrase {
    margin-top: 6px !important;

    padding: 5px 8px !important;

    font-size: 9px !important;
  }


  /* Audience */

  .plan-audience {
    margin: 11px 0 0 !important;

    padding: 10px !important;

    border-radius: 12px !important;
  }

  .plan-audience ul {
    margin-top: 4px !important;

    font-size: 10px !important;
  }


  /* Features */

  .plan-feature-list {
    margin: 11px 0 0 !important;

    gap: 6px !important;
  }

  .plan-feature-list li {
    font-size: 10.5px !important;
    line-height: 1.75 !important;
  }


  /* =====================================================
     Duration
     ===================================================== */

  .plan-duration-panel {
    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    padding: 11px !important;

    border-radius: 14px !important;
  }

  .plan-duration-heading {
    margin-bottom: 9px !important;
  }

  .plan-duration-options {
    grid-template-columns: 1fr !important;

    gap: 7px !important;
  }

  .plan-duration-option {
    width: 100% !important;

    padding: 9px !important;

    border-radius: 11px !important;

    transform: none !important;
  }

  .plan-duration-option:hover {
    transform: none !important;
  }

  .plan-total-price {
    margin-top: 9px !important;

    padding: 10px 11px !important;

    border-radius: 12px !important;
  }


  /* =====================================================
     Form
     ===================================================== */

  .checkout-card input,
  .checkout-card select,
  .checkout-card textarea {
    width: 100% !important;

    font-size: 16px !important;
  }

  .checkout-submit {
    width: 100% !important;

    text-align: center !important;

    white-space: normal !important;
  }


  /* =====================================================
     Important notes mobile
     بعد از فرم
     ===================================================== */

  .checkout-assurance {
    margin-top: 0 !important;
  }

  .checkout-assurance h2 {
    font-size: 17px !important;
  }

  .checkout-assurance ol {
    margin: 12px 0 0 !important;

    padding-right: 19px !important;

    gap: 8px !important;

    font-size: 11px !important;
  }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

  .checkout-section .checkout-layout {
    width: calc(100% - 14px) !important;
  }

  .checkout-card,
  .checkout-assurance {
    padding: 12px !important;
  }

  .plan-tier-grid {
    gap: 4px !important;
  }

  .plan-tier-card {
    padding-right: 3px !important;
    padding-left: 3px !important;

    min-height: 112px !important;
  }

  .plan-tier-copy strong {
    font-size: 9.5px !important;
  }

  .plan-tier-price b {
    font-size: 8.5px !important;
  }

}


/* =========================================================
   ENAMAD BUY FOOTER
   ========================================================= */

.site-footer .enamad-slot {
  width: 120px !important;
  max-width: 100% !important;

  margin: 14px auto 0 !important;

  text-align: center !important;
}

.site-footer .enamad-slot > a {
  display: inline-block !important;
}

.site-footer .enamad-slot img {
  display: block !important;

  max-width: 105px !important;
  height: auto !important;

  margin: auto !important;
}


/* =========================================================
   BUY DESKTOP SYMMETRIC FINAL
   فرم و نکات مهم کاملاً متقارن
   ========================================================= */

@media (min-width: 901px) {

  .checkout-section .checkout-layout {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr) !important;

    column-gap: 22px !important;
    row-gap: 22px !important;

    align-items: stretch !important;
  }


  /* انتخاب پلن همچنان تمام عرض */
  .checkout-card:first-child {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }


  /* فرم */
  .checkout-card:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 2 !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 100% !important;

    padding: 28px !important;

    align-self: stretch !important;
  }


  /* نکات مهم */
  .checkout-assurance {
    grid-column: 2 !important;
    grid-row: 2 !important;

    position: relative !important;
    top: auto !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 100% !important;
    min-height: 100% !important;

    margin: 0 !important;
    padding: 28px !important;

    align-self: stretch !important;

    display: flex !important;
    flex-direction: column !important;
  }


  .checkout-assurance h2 {
    margin: 0 0 16px !important;

    font-size: 21px !important;
    line-height: 1.6 !important;
  }


  .checkout-assurance ol {
    width: 100% !important;

    margin: 6px 0 0 !important;
    padding-right: 22px !important;

    display: grid !important;
    gap: 16px !important;

    font-size: 13px !important;
    line-height: 2 !important;
  }


  .checkout-assurance li {
    padding-right: 3px !important;
  }

}


/* =========================================================
   TABLET / MOBILE
   متقارن دسکتاپ روی موبایل اعمال نشود
   ========================================================= */

@media (max-width: 900px) {

  .checkout-card:nth-child(2),
  .checkout-assurance {
    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    padding: 18px !important;
  }

}


@media (max-width: 640px) {

  .checkout-card:nth-child(2),
  .checkout-assurance {
    padding: 14px !important;
  }

  .checkout-assurance h2 {
    margin-bottom: 10px !important;
  }

  .checkout-assurance ol {
    gap: 8px !important;
  }

}


/* =========================================================
   BUY TERMS / RULES FIX
   ========================================================= */

.terms-check {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;

  align-items: start !important;

  width: 100% !important;
  max-width: 100% !important;

  gap: 10px !important;

  margin: 18px 0 !important;
  padding: 13px 14px !important;

  direction: rtl !important;
  text-align: right !important;

  color: #4e6473 !important;

  font-size: 12px !important;
  line-height: 1.9 !important;

  background: #f8fbf9 !important;

  border: 1px solid #dce9e1 !important;
  border-radius: 14px !important;

  box-sizing: border-box !important;
}


/* چک‌باکس */
.terms-check input[type="checkbox"] {
  grid-column: 1 !important;

  width: 18px !important;
  height: 18px !important;

  min-width: 18px !important;

  margin: 4px 0 0 !important;
  padding: 0 !important;

  accent-color: var(--green-600) !important;

  cursor: pointer !important;
}


/* متن قوانین */
.terms-check > span,
.terms-check > label,
.terms-check > div {
  grid-column: 2 !important;

  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  text-align: right !important;
}


/* لینک قوانین */
.terms-check a {
  display: inline !important;

  color: var(--green-700) !important;

  font-weight: 850 !important;

  text-decoration: none !important;

  white-space: normal !important;
}

.terms-check a:hover {
  text-decoration: underline !important;
}


/* اگر ساختار HTML به شکل input + متن مستقیم باشد */
.terms-check {
  overflow-wrap: anywhere !important;
}


/* موبایل */
@media (max-width: 640px) {

  .terms-check {
    grid-template-columns: 20px minmax(0, 1fr) !important;

    gap: 8px !important;

    margin: 14px 0 !important;

    padding: 11px 12px !important;

    border-radius: 12px !important;

    font-size: 11px !important;
    line-height: 1.85 !important;
  }

  .terms-check input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;

    min-width: 17px !important;

    margin-top: 3px !important;
  }

}


/* =========================================================
   BUY TERMS / RULES FIX
   ========================================================= */

.terms-check {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;

  align-items: start !important;

  width: 100% !important;
  max-width: 100% !important;

  gap: 10px !important;

  margin: 18px 0 !important;
  padding: 13px 14px !important;

  direction: rtl !important;
  text-align: right !important;

  color: #4e6473 !important;

  font-size: 12px !important;
  line-height: 1.9 !important;

  background: #f8fbf9 !important;

  border: 1px solid #dce9e1 !important;
  border-radius: 14px !important;

  box-sizing: border-box !important;
}


/* چک‌باکس */
.terms-check input[type="checkbox"] {
  grid-column: 1 !important;

  width: 18px !important;
  height: 18px !important;

  min-width: 18px !important;

  margin: 4px 0 0 !important;
  padding: 0 !important;

  accent-color: var(--green-600) !important;

  cursor: pointer !important;
}


/* متن قوانین */
.terms-check > span,
.terms-check > label,
.terms-check > div {
  grid-column: 2 !important;

  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  text-align: right !important;
}


/* لینک قوانین */
.terms-check a {
  display: inline !important;

  color: var(--green-700) !important;

  font-weight: 850 !important;

  text-decoration: none !important;

  white-space: normal !important;
}

.terms-check a:hover {
  text-decoration: underline !important;
}


/* اگر ساختار HTML به شکل input + متن مستقیم باشد */
.terms-check {
  overflow-wrap: anywhere !important;
}


/* موبایل */
@media (max-width: 640px) {

  .terms-check {
    grid-template-columns: 20px minmax(0, 1fr) !important;

    gap: 8px !important;

    margin: 14px 0 !important;

    padding: 11px 12px !important;

    border-radius: 12px !important;

    font-size: 11px !important;
    line-height: 1.85 !important;
  }

  .terms-check input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;

    min-width: 17px !important;

    margin-top: 3px !important;
  }

}
