/* Vazir @ 30.1.0, CSS-only remote font source; no font files distributed. */
@font-face{font-family:'KKPS Vazir';src:url('https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/Vazir-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'KKPS Vazir';src:url('https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/Vazir-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'KKPS Vazir';src:url('https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/Vazir-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}

/* Restrict styling to Khadamat subscription components, not the WordPress site. */
.kkps-account,.kkps-account :is(h1,h2,h3,h4,p,span,small,strong,em,label,select,option,button,input),
.kkps-payment-notice,.kkps-payment-notice :is(strong,p,span),
.kkps-subscription-status,.kkps-subscription-expiry,.kkps-subscription-days-left {
  font-family:'KKPS Vazir','Vazir','Vazirmatn',Tahoma,sans-serif!important;
}
.kkps-account{line-height:1.9;text-align:right}
.kkps-account h3{font-size:clamp(19px,2vw,25px);font-weight:700;line-height:1.6;margin:0 0 16px}
.kkps-account label,.kkps-account select,.kkps-account button{font-size:14px;line-height:1.8}
.kkps-account select{max-width:100%;min-height:43px;border:1px solid #d8dbe4;border-radius:8px;background:#fff;color:#1c2135;padding:7px 10px}
.kkps-account button{border-radius:8px;min-height:42px;padding:9px 16px;cursor:pointer}
.kkps-payment-notice{line-height:1.95!important;font-size:14px!important}
.kkps-payment-notice strong{font-size:16px!important;font-weight:700}
.kkps-payment-notice p{font-size:14px!important;line-height:1.95!important}
@media(max-width:640px){.kkps-account{width:100%;box-sizing:border-box;padding:16px!important}.kkps-account select{width:100%}.kkps-account button{margin-top:8px}}

/* v0.2.6 — compact horizontal desktop / stacked mobile renewal card. */
/* Scope all rules to plugin UI; the site profile and Elementor templates are unchanged. */
.kkps-renewal-card,
.kkps-renewal-card :where(*, *::before, *::after) {
  box-sizing:border-box;
  font-family:'KKPS Vazir','Vazir','Vazirmatn',Tahoma,sans-serif!important;
}
.kkps-account.kkps-renewal-card {
  width:100%!important;max-width:none!important;min-width:0;
  margin:12px 0!important;padding:18px 20px!important;
  border:1px solid #e3e7ee;border-radius:14px;
  box-shadow:0 3px 14px rgba(28,33,53,.045);background:#fff;
  color:#1c2135;direction:rtl;text-align:right;line-height:1.65;
  container-type:inline-size;
}
.kkps-renewal-header{margin:0 0 13px!important}
.kkps-renewal-card .kkps-renewal-header h3 {
  margin:0 0 3px!important;padding:0!important;
  font-size:17px!important;line-height:1.55!important;color:#1c2135!important;
  font-weight:700!important;
}
.kkps-renewal-card .kkps-renewal-header p {
  margin:0!important;font-size:12px!important;line-height:1.6!important;
  color:#647084!important;
}
.kkps-renewal-layout{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,180px);
  align-items:stretch;gap:16px;min-width:0;
}
.kkps-renewal-controls{min-width:0}
.kkps-renewal-form{display:flex;flex-direction:column;gap:9px;margin:0!important}
.kkps-renewal-card .kkps-renewal-plan-group{min-width:0;border:0!important;padding:0!important;margin:0!important}
.kkps-renewal-card .kkps-renewal-label{
  padding:0!important;margin:0 0 7px!important;font-size:12px!important;font-weight:700!important;
  color:#1c2135!important;line-height:1.6!important;float:none!important;width:auto!important;
}
.kkps-renewal-plan-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0}
.kkps-renewal-card .kkps-renewal-plan{
  display:flex!important;flex-direction:row;align-items:center;justify-content:center;
  gap:7px;min-width:0;min-height:38px;margin:0!important;padding:7px 5px!important;
  background:#fff!important;color:#1c2135!important;
  border:1px solid #dce2eb!important;border-radius:8px!important;
  cursor:pointer;font-size:12px!important;font-weight:500!important;line-height:1.6!important;
  transition:border-color .15s ease, background-color .15s ease;
}
.kkps-renewal-plan input[type=radio]{
  appearance:auto!important;display:inline-block!important;visibility:visible!important;
  flex:none!important;width:14px!important;height:14px!important;min-width:14px!important;
  padding:0!important;margin:0!important;accent-color:#f02d3a!important;position:static!important;
}
.kkps-renewal-plan:has(input:checked){border-color:#f02d3a!important;background:#fff7f8!important;color:#f02d3a!important}
.kkps-renewal-plan:focus-within{outline:2px solid #1c2135!important;outline-offset:2px}
.kkps-renewal-payment{display:flex;flex-direction:column;gap:8px;min-width:0}
.kkps-renewal-card .kkps-renewal-total{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin:0!important;padding:10px 13px!important;min-width:0;min-height:42px;
  border:0!important;border-radius:8px;background:#f5f7fa!important;
  color:#2e3544!important;font-size:12px!important;line-height:1.6!important;
}
.kkps-renewal-card .kkps-renewal-total strong{color:#1c2135!important;font-size:14px!important;font-weight:700!important;white-space:nowrap}
.kkps-renewal-card .kkps-renewal-total output{font-family:inherit!important}
.kkps-renewal-card .kkps-renewal-pay,
.kkps-renewal-card button.kkps-renewal-pay {
  display:block!important;width:100%!important;min-height:40px!important;
  margin:0!important;padding:8px 14px!important;
  background:#1c2135!important;background-color:#1c2135!important;background-image:none!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  border:1px solid #1c2135!important;border-radius:8px!important;
  box-shadow:none!important;text-shadow:none!important;
  text-align:center;font-size:13px!important;font-weight:700!important;line-height:1.55!important;
  cursor:pointer;transform:none!important;transition:background-color .15s ease;
}
.kkps-renewal-card button.kkps-renewal-pay:is(:hover,:active,:focus){
  background:#2e3544!important;background-color:#2e3544!important;background-image:none!important;
  border-color:#2e3544!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
}
.kkps-renewal-card .kkps-renewal-pay:disabled{opacity:.5!important;cursor:not-allowed!important}
.kkps-renewal-card .kkps-renewal-hint{
  margin:8px 0 0!important;padding:0!important;
  color:#647084!important;font-size:10px!important;line-height:1.7!important;
}
.kkps-renewal-expiry{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:5px;min-width:0;padding:13px 8px!important;
  border:1px solid #edf0f5;border-radius:10px;background:#f7f8fb;
  text-align:center;line-height:1.7;
}
.kkps-renewal-expiry-label{font-size:12px!important;font-weight:700!important;color:#1c2135!important}
.kkps-renewal-expiry :is(time,.kkps-renewal-no-expiry){
  font-size:11px!important;line-height:1.75!important;font-weight:500!important;
  color:#596477!important;white-space:normal;overflow-wrap:anywhere;
}
.kkps-card-warning{font-size:13px;color:#991b1b}
/* Narrow Elementor columns and small screens stack without fixed-width overflow. */
@container (max-width:580px){
  .kkps-renewal-layout{display:flex;flex-direction:column;gap:10px}
  .kkps-renewal-expiry{order:-1;align-items:flex-start;text-align:right;padding:10px 12px!important}
  .kkps-renewal-plan-options{gap:6px}
}
@media(max-width:640px){
  .kkps-account.kkps-renewal-card{width:100%!important;max-width:100%!important;margin:10px 0!important;padding:12px!important}
  .kkps-renewal-layout{display:flex;flex-direction:column;gap:10px}
  .kkps-renewal-expiry{order:-1;align-items:flex-start;text-align:right;padding:10px 12px!important}
  .kkps-renewal-card .kkps-renewal-header h3{font-size:15px!important}
  .kkps-renewal-card .kkps-renewal-header p{font-size:11px!important}
  .kkps-renewal-card .kkps-renewal-total{padding:9px!important}
  .kkps-renewal-card .kkps-renewal-total strong{font-size:13px!important}
  .kkps-renewal-card .kkps-renewal-plan{font-size:11px!important;gap:4px;min-height:36px;padding:6px 4px!important}
}
@media(max-width:340px){
  .kkps-renewal-plan-options{grid-template-columns:1fr}
  .kkps-renewal-card .kkps-renewal-total{flex-wrap:wrap}
}

/* Keyboard focus: visible brand-red affordance, never a black browser frame. */
.kkps-renewal-card .kkps-renewal-plan:focus-within{
  outline:0!important;box-shadow:inset 0 0 0 1px #f02d3a!important;
}
.kkps-renewal-card input[type="radio"]:focus-visible{
  outline:0!important;box-shadow:0 0 0 2px rgba(240,45,58,.20)!important;
}
.kkps-renewal-expiry .kkps-renewal-no-expiry{font-weight:700!important;color:#536078!important}

/* v0.2.9 — unmistakable but compact notice for an unpublished draft. */
.kkps-renewal-card .kkps-renewal-draft-notice {
  display:flex;align-items:flex-start;gap:9px;direction:rtl;text-align:right;
  margin:0 0 13px!important;padding:10px 12px!important;
  color:#a32130!important;background:#fff4f5!important;
  border:1px solid #ffcbd0!important;border-right:3px solid #f02d3a!important;
  border-radius:9px!important;font-size:12px!important;line-height:1.85!important;font-weight:600!important;
}
.kkps-renewal-card .kkps-renewal-draft-icon {
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:19px;height:19px;border:1.5px solid #f02d3a;border-radius:50%;
  color:#f02d3a!important;font-size:13px;font-weight:800;line-height:1!important;
}
@media(max-width:640px){
  .kkps-renewal-card .kkps-renewal-draft-notice {font-size:11px!important;padding:9px!important;margin-bottom:10px!important}
}

/* v0.2.10 - explicit synthetic QA consent, no manual post selection. */
.kkps-renewal-card .kkps-qa-consent{display:flex!important;align-items:flex-start!important;gap:8px!important;margin:9px 0 12px!important;font-size:12px!important;line-height:1.9!important;color:#7f3340!important;text-align:right!important;cursor:pointer}
.kkps-renewal-card .kkps-qa-consent input[type=checkbox]{flex:none!important;margin-top:5px!important;width:16px!important;height:16px!important;accent-color:#f02d3a!important}
@media(max-width:640px){.kkps-renewal-card .kkps-qa-consent{font-size:11px!important}}

/* v0.2.11: keep verified-payment feedback beside the renewal card, without tall Elementor section gaps. */
.kkps-auto-notice-slot { margin: 0 0 10px!important; width:100%; min-width:0; }
.kkps-auto-notice-slot .kkps-payment-notice { max-width:none!important; margin:0!important; padding:12px 15px!important; }
.kkps-renewal-edit-row { margin-top:11px!important; text-align:right; }
.kkps-account .kkps-edit-provider-link {display:inline-flex;align-items:center;border:1px solid #dbe1eb;border-radius:8px;padding:7px 12px;text-decoration:none!important;font-size:12px!important;color:#1c2135!important;background:#fff;}
.kkps-account .kkps-edit-provider-link:hover,.kkps-account .kkps-edit-provider-link:focus {background:#f5f7fa;color:#f02d3a!important;}
.kkps-renewal-card .kkps-awaiting-review {background:#fffbeb!important;border-color:#f5d287!important;color:#854d0e!important;}
@media(max-width:640px) {.kkps-auto-notice-slot .kkps-payment-notice {padding:10px!important;} .kkps-renewal-edit-row{margin-top:8px!important;}}

/* Gateways appear only if an administrator has configured two active simulators. */
.kkps-account .kkps-gateway-choice{border:0;padding:0;margin:10px 0 8px;min-width:0}
.kkps-account .kkps-gateway-choice legend{font-size:12px;color:#1c2135;font-weight:700;padding:0 0 5px}
.kkps-account .kkps-gateway-choice-item{display:inline-flex;gap:6px;align-items:center;min-height:37px;padding:6px 12px;margin:0 0 5px 7px;border:1px solid #d6dce7;border-radius:8px;color:#1c2135;font-size:12px}
.kkps-account .kkps-gateway-choice-item input{accent-color:#f02d3a}


/* v0.2.19 — prevent oversized mobile whitespace below the subscription card.
 * The subscription shortcode sits in the profile's Elementor grid (template 1266),
 * which can create stretched implicit rows at phone breakpoints.
 * Scope any Elementor compatibility rules to THIS account page and grid only.
 * The plugin card and its actual content must always keep intrinsic block height.
 * This does not affect checkout state, orders, payments or desktop layout.
 */
@media screen and (max-width: 767px) {
  body.page-id-1263 .elementor-1266 .elementor-element-691b9f7,
  body.page-id-1263 .elementor-1266 .e-grid:has(.kkps-renewal-card) {
    grid-template-rows: none !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    align-items: start !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.page-id-1263 .elementor-1266 .elementor-element-dd3b7e4,
  body.page-id-1263 .elementor-1266 .elementor-element-e67176d,
  body.page-id-1263 .elementor-1266 .elementor-element-e67176d > .elementor-widget-container,
  body.page-id-1263 .elementor-1266 .e-grid:has(.kkps-renewal-card) > .e-con:has(.kkps-renewal-card) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
  }

  body.page-id-1263 .kkps-account.kkps-renewal-card {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
    flex: 0 0 auto !important;
    container-type: normal !important;
    margin: 8px 0 !important;
  }

  body.page-id-1263 .kkps-renewal-card .kkps-renewal-layout,
  body.page-id-1263 .kkps-renewal-card .kkps-renewal-controls,
  body.page-id-1263 .kkps-renewal-card .kkps-renewal-form,
  body.page-id-1263 .kkps-renewal-card .kkps-renewal-expiry {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

/* v0.2.33 — server-authoritative last transaction status on /account/. */
body.page-id-1263 .kkps-payment-notice,
body.page-id-1263 .kkps-payment-notice *{
  box-sizing:border-box;
  font-family:'IRANYEKAN','IranYekan','Yekan Bakh',Tahoma,sans-serif!important;
}
body.page-id-1263 .kkps-payment-notice{
  width:100%;max-width:100%;min-width:0;margin:0 0 12px!important;
  padding:13px 16px!important;background:#f7f8fb;color:#1c2135;
  border:1px solid #dce3ed;border-right:4px solid #64748b;border-radius:13px;
  box-shadow:0 2px 10px rgba(28,33,53,.045);
  direction:rtl;text-align:right;overflow-wrap:anywhere;line-height:1.65;
}
body.page-id-1263 .kkps-payment-notice--success{border-right-color:#16805d;background:#f1fcf5;border-color:#b9e9cc;color:#124d38}
body.page-id-1263 .kkps-payment-notice--danger{border-right-color:#c73548;background:#fff6f7;border-color:#f5d0d5;color:#852335}
body.page-id-1263 .kkps-payment-notice--warning{border-right-color:#b77a1a;background:#fffaf0;border-color:#f0dcae;color:#765019}
body.page-id-1263 .kkps-payment-notice__eyebrow{display:block;font-size:10px!important;font-weight:600!important;opacity:.83;margin:0 0 3px!important}
body.page-id-1263 .kkps-payment-notice__title{display:block;font-size:14px!important;font-weight:800!important;line-height:1.6!important;margin:0 0 4px!important}
body.page-id-1263 .kkps-payment-notice__body{font-size:11.5px!important;line-height:1.8!important;font-weight:400!important;margin:0!important;color:inherit!important}
body.page-id-1263 .kkps-auto-notice-slot{margin:0 0 10px!important;max-width:100%;min-width:0}
/* Existing Elementor account template #1266 retains all content and global header.
   Only fix the narrow subscription-column viewport and the plugin-owned cards. */
@media (max-width:767px){
  body.page-id-1263 .elementor-1266 .elementor-element-24eaecd:has(.kkps-renewal-card),
  body.page-id-1263 .elementor-1266 .elementor-element-691b9f7:has(.kkps-renewal-card),
  body.page-id-1263 .elementor-1266 .elementor-element-e67176d:has(.kkps-renewal-card),
  body.page-id-1263 .elementor-1266 .elementor-element-e67176d > .elementor-widget-container:has(.kkps-renewal-card){
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
  body.page-id-1263 .elementor-1266 .elementor-element-691b9f7:has(.kkps-renewal-card){
    grid-template-columns:minmax(0,1fr)!important;
    /* Reserve space for the app's fixed mobile navigation bar. */
    padding-bottom:calc(84px + env(safe-area-inset-bottom, 0px))!important;
  }
  body.page-id-1263 .kkps-account.kkps-renewal-card{
    box-sizing:border-box!important;max-width:100%!important;min-width:0!important;
    padding:12px!important;margin:8px 0!important;
  }
  body.page-id-1263 .kkps-payment-notice{padding:11px 12px!important;margin:0 0 10px!important;border-radius:11px}
  body.page-id-1263 .kkps-payment-notice__title{font-size:13px!important}
  body.page-id-1263 .kkps-payment-notice__body{font-size:11px!important}
}

/* v0.2.34 — optional one-time order notice; hide until its browser-only
   display check completes, preventing a stale banner flash on refresh. */
body.page-id-1263 .kkps-payment-notice[data-kkps-once-key]{display:none!important}
body.page-id-1263 .kkps-payment-notice[data-kkps-once-key][data-kkps-once-visible="1"]{display:block!important}
body.page-id-1263 .kkps-auto-notice-slot:empty{display:none!important;margin:0!important}
