/* OpenIranIP VPN — front-end (builds on the openiranip-theme tokens, with fallbacks). */
.oip-box, .oip-kyc, .oip-renew, .oip-subs, .oip-tg-connect, .oip-alert { direction: rtl; text-align: right; }
.oip-muted { color: var(--oi-muted, #5D6B7E); }
.oip-center { text-align: center; }

.oip-standalone { padding: 40px 0 70px; background: var(--oi-paper, #FAFAF7); min-height: 60vh; }
.oip-standalone__inner { max-width: 760px; margin-inline: auto; padding-inline: 16px; }
.oip-standalone__title { font-size: 26px; margin: 0 0 22px; }

/* Alerts */
.oip-alert { padding: 13px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 14px; line-height: 1.9; border: 1px solid transparent; }
.oip-alert--success { background: #EAF8F1; border-color: #BFE9D3; color: #0E6B49; }
.oip-alert--error { background: var(--oi-danger-bg, #FCEEEE); border-color: #F3C9C9; color: #9B2C2C; }
.oip-alert--warn { background: var(--oi-amber-bg, #F8ECDD); border-color: #F0D5B4; color: var(--oi-amber-text, #A05E1B); }
.oip-alert--info { background: var(--oi-tint-blue, #EEF2FE); border-color: var(--oi-tint-blue-border, #DCE4FA); color: #1E3A8A; }
.oip-alert--action { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* Steps */
.oip-steps { display: flex; list-style: none; padding: 0; margin: 0 0 22px; gap: 8px; counter-reset: s; }
.oip-steps li { flex: 1; text-align: center; font-size: 12.5px; color: var(--oi-faint, #8494AC); position: relative; }
.oip-steps li span { display: block; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--oi-border, #E7EAF0); line-height: 30px; font-weight: 700; color: #fff; }
.oip-steps li span::before { counter-increment: s; content: counter(s); }
.oip-steps li.is-done { color: var(--oi-body, #16233B); font-weight: 600; }
.oip-steps li.is-done span { background: var(--oi-success, #17A673); }
.oip-steps li.is-done span::before { content: '✓'; }

.oip-box { background: #fff; border: 1px solid var(--oi-border, #E7EAF0); border-radius: 18px; padding: 24px; margin: 24px 0; }
.oip-standalone .oip-box { margin-top: 0; }

/* Summary grid */
.oip-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
.oip-summary--current { grid-template-columns: repeat(3, 1fr); }
.oip-summary > div { background: var(--oi-ice, #F1F4F9); border-radius: 12px; padding: 12px; text-align: center; }
.oip-summary span { display: block; font-size: 12px; color: var(--oi-muted, #5D6B7E); margin-bottom: 4px; }
.oip-summary b { font-size: 14px; }
@media (max-width: 640px) { .oip-summary, .oip-summary--current { grid-template-columns: repeat(2, 1fr); } }

/* Subscriptions */
.oip-sub { margin-bottom: 28px; }
.oip-sub .oi-sub-card { margin-bottom: 16px; }
.oip-pill.is-expired { background: rgba(194, 88, 42, .18); color: #FFB58F; }
.oip-traffic { margin-top: 16px; }
.oip-traffic__bar { height: 8px; background: rgba(255, 255, 255, .1); border-radius: 99px; overflow: hidden; }
.oip-traffic__bar i { display: block; height: 100%; background: linear-gradient(90deg, #37C8F0, #6D5AE6); border-radius: 99px; transition: width .4s; }
.oip-traffic__txt { font-size: 12.5px; color: var(--oi-dark-subtext, #AFC0D8); margin-top: 6px; }
.oip-traffic__txt b { color: #fff; }
.oip-sub .oi-account-actions button { cursor: pointer; font-family: inherit; }

/* Config panel */
.oip-config { margin-top: 16px; }
.oip-config__inner { background: #fff; border: 1px solid var(--oi-border, #E7EAF0); border-radius: 16px; padding: 18px; }
.oip-config__item { margin-bottom: 16px; }
.oip-config__item label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.oip-copy { display: flex; gap: 8px; align-items: stretch; }
.oip-copy code { flex: 1; min-width: 0; display: block; direction: ltr; text-align: left; background: var(--oi-ice, #F1F4F9); border: 1px dashed #C9D3EA; border-radius: 10px; padding: 10px 12px; font-size: 12px; word-break: break-all; max-height: 92px; overflow: auto; }
.oip-copy__btn { flex: none; border: 0; border-radius: 10px; padding: 0 16px; background: var(--oip-primary, #2E5CE6); color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }
.oip-copy__btn.is-ok { background: var(--oi-success, #17A673); }
.oip-link-btn { background: none; border: 0; color: var(--oip-primary, #2E5CE6); cursor: pointer; padding: 8px 0 0; font-family: inherit; font-size: 13px; }
.oip-qr { text-align: center; margin-top: 10px; }
.oip-qr img { width: 240px; max-width: 100%; border-radius: 12px; border: 1px solid var(--oi-border, #E7EAF0); }
.oip-config__help { font-size: 12.5px; margin: 0; }

/* Telegram connect */
.oip-tg-connect { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--oi-tint-blue, #EEF2FE); border: 1px solid var(--oi-tint-blue-border, #DCE4FA); margin-top: 8px; flex-wrap: wrap; }
.oip-tg-connect p { margin: 4px 0 0; font-size: 13px; color: var(--oi-muted, #5D6B7E); }

/* Forms */
.oip-form textarea, .oip-field input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--oi-border-btn, #DDE3EC); border-radius: 12px; font-size: 15px; font-family: inherit; background: #fff; }
.oip-field input:focus, .oip-form textarea:focus { outline: none; border-color: var(--oip-primary, #2E5CE6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oip-primary, #2E5CE6) 14%, transparent); }
.oip-field { display: block; }
.oip-field > span { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.oip-field small { display: block; color: var(--oi-faint, #8494AC); font-size: 12px; margin-top: 4px; }
.oip-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 640px) { .oip-grid-2 { grid-template-columns: 1fr; } }
.oip-form .oi-btn { margin-top: 6px; }
.oip-form textarea { margin: 10px 0; }

/* KYC */
.oip-kyc__head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.oip-kyc__head h3 { margin: 0 0 2px; font-size: 18px; }
.oip-kyc__head p { margin: 0; font-size: 13px; }
.oip-kyc__icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--oip-primary, #2E5CE6), color-mix(in srgb, var(--oip-primary, #2E5CE6) 60%, #8B5CF6)); color: #fff; display: grid; place-items: center; flex: none; }
.oip-kyc__intro { background: var(--oi-warm-bg, #FAFAF7); border: 1px solid var(--oi-warm-border, #EDEBE4); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 2; color: var(--oi-warm-text, #4A3A28); margin-bottom: 12px; }
.oip-kyc__trust { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.oip-kyc__trust li { font-size: 12.5px; background: var(--oi-ice, #F1F4F9); border-radius: 99px; padding: 6px 12px; }
.oip-kyc__enamad { margin-bottom: 14px; }
.oip-kyc__attempts { font-size: 13px; color: var(--oi-muted, #5D6B7E); margin: 4px 0 12px; }
.oip-kyc .is-loading { opacity: .7; pointer-events: none; }

/* Receipt */
.oip-bank { background: var(--oi-ice, #F1F4F9); border-radius: 12px; padding: 14px 16px; margin: 12px 0 16px; }
.oip-bank__amount { margin-bottom: 6px; }
.oip-bank__info { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 14px; direction: rtl; background: none; padding: 0; border: 0; }
.oip-file { display: block; border: 2px dashed #C9D3EA; border-radius: 14px; padding: 18px; text-align: center; cursor: pointer; background: #FBFCFF; }
.oip-file input { display: block; margin: 0 auto 8px; max-width: 100%; }
.oip-file span { font-size: 13px; color: var(--oi-muted, #5D6B7E); }
.oip-or { text-align: center; color: var(--oi-faint, #8494AC); margin: 12px 0; }
.oip-btn-tg { width: 100%; justify-content: center; }
.oip-receipts { margin: 16px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--oi-muted, #5D6B7E); }

/* Renew */
.oip-renew h3 { font-size: 16px; margin: 20px 0 10px; }
.oip-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .oip-plans { grid-template-columns: 1fr; } }
.oip-plan { cursor: pointer; display: block; }
.oip-plan input, .oip-method input { position: absolute; opacity: 0; }
.oip-plan__body { display: block; border: 2px solid var(--oi-border, #E7EAF0); border-radius: 14px; padding: 14px 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.oip-plan__body b { display: block; font-size: 16px; }
.oip-plan__body small { display: block; color: var(--oi-muted, #5D6B7E); margin: 4px 0; }
.oip-plan__body em { font-style: normal; font-weight: 800; color: var(--oip-primary, #2E5CE6); }
.oip-plan input:checked + .oip-plan__body { border-color: var(--oip-primary, #2E5CE6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oip-primary, #2E5CE6) 14%, transparent); }
.oip-methods { display: grid; gap: 10px; margin-bottom: 14px; }
.oip-method { cursor: pointer; position: relative; }
.oip-method span { display: block; border: 2px solid var(--oi-border, #E7EAF0); border-radius: 12px; padding: 12px 16px; background: #fff; }
.oip-method input:checked + span { border-color: var(--oip-primary, #2E5CE6); background: var(--oi-tint-blue, #EEF2FE); }
.oip-method small { color: var(--oi-muted, #5D6B7E); }
.oip-tut-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.oip-tut-link { display: inline-block; padding: 7px 14px; border-radius: 10px; background: var(--oi-tint-blue, #EEF2FE); border: 1px solid var(--oi-tint-blue-border, #DCE4FA); color: var(--oip-primary, #2E5CE6); font-size: 13px; text-decoration: none; }
.oip-tut-link:hover { background: var(--oip-primary, #2E5CE6); color: #fff; }
.oip-config__help a { color: var(--oip-primary, #2E5CE6); }

/* ------------------------------------------------------------------
 * Theme-independent base: the account cards and buttons reuse the
 * openiranip-theme class names, these rules make them look right on
 * any theme (same values as the reference theme).
 * ------------------------------------------------------------------ */
.oip-scope { --oip-primary: #2E5CE6; direction: rtl; text-align: right; line-height: 1.9; }
.oip-scope h1 { font-size: 24px; margin: 0 0 16px; }
.oip-scope .oi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; line-height: 1.6; transition: transform .15s, box-shadow .15s, background .15s; }
.oip-scope .oi-btn--primary { background: linear-gradient(120deg, var(--oip-primary), color-mix(in srgb, var(--oip-primary) 65%, #8B5CF6)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--oip-primary) 28%, transparent); }
.oip-scope .oi-btn--primary:hover { transform: translateY(-1px); color: #fff; }
.oip-scope .oi-btn--outline { background: #fff; color: #101828; border-color: #DDE3EC; }
.oip-scope .oi-btn--outline:hover { border-color: var(--oip-primary); color: var(--oip-primary); }
.oip-scope .oi-btn--sm { padding: 8px 16px; font-size: 13px; }
.oip-scope .oi-btn--block { width: 100%; }
.oip-scope .oi-sub-card { background: linear-gradient(168deg, #1A2740, #101828); border-radius: 20px; padding: 26px; color: #fff; }
.oip-scope .oi-sub-card h2 { color: #fff; font-size: 20px; margin: 12px 0 4px; }
.oip-scope .oi-sub-status-pill { background: rgba(23, 166, 115, .15); color: #4ADE9A; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; display: inline-block; }
.oip-scope .oi-sub-card__expiry { font-size: 13px; color: #AFC0D8; margin: 0; }
.oip-scope .oi-sub-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.oip-scope .oi-sub-stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 12px; text-align: center; }
.oip-scope .oi-sub-stat span { display: block; font-size: 11.5px; color: #AFC0D8; margin-bottom: 4px; }
.oip-scope .oi-sub-stat b { font-size: 14px; color: #fff; }
.oip-scope .oi-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 782px) { .oip-scope .oi-sub-stats { grid-template-columns: repeat(2, 1fr); } .oip-scope .oi-account-actions { grid-template-columns: 1fr; } }
.oip-scope .oi-empty-state { text-align: center; max-width: 600px; margin-inline: auto; }
.oip-scope .oi-empty-state__icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: color-mix(in srgb, var(--oip-primary) 10%, #fff); color: var(--oip-primary); margin-bottom: 12px; }
.oip-scope .oi-container { max-width: 1180px; margin-inline: auto; }
.oip-summary--3 { grid-template-columns: repeat(3, 1fr); }

/* ------------------------------------------------------------------
 * WooCommerce "pay for order" page (order-pay) — card layout
 * ------------------------------------------------------------------ */
body.woocommerce-order-pay .woocommerce { max-width: 760px; margin-inline: auto; }
body.woocommerce-order-pay form#order_review { direction: rtl; text-align: right; }
body.woocommerce-order-pay form#order_review table.shop_table { width: 100%; background: #fff; border: 1px solid #E7EAF0; border-radius: 16px; border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 0 0 18px; font-size: 14px; }
body.woocommerce-order-pay form#order_review table.shop_table th,
body.woocommerce-order-pay form#order_review table.shop_table td { padding: 13px 18px; text-align: right; border: 0; border-bottom: 1px solid #EEF1F5; vertical-align: middle; }
body.woocommerce-order-pay form#order_review table.shop_table thead th { background: #F6F8FB; color: #5D6B7E; font-weight: 600; font-size: 12.5px; }
body.woocommerce-order-pay form#order_review table.shop_table .product-quantity { text-align: center; width: 90px; }
body.woocommerce-order-pay form#order_review table.shop_table .product-total,
body.woocommerce-order-pay form#order_review table.shop_table tfoot td { text-align: left; white-space: nowrap; }
body.woocommerce-order-pay form#order_review table.shop_table .product-name { font-weight: 600; color: #101828; }
body.woocommerce-order-pay form#order_review table.shop_table tfoot th { color: #5D6B7E; font-weight: 500; }
body.woocommerce-order-pay form#order_review table.shop_table tfoot tr:last-child th,
body.woocommerce-order-pay form#order_review table.shop_table tfoot tr:last-child td { border-bottom: 0; font-size: 16px; font-weight: 800; color: #101828; background: #FBFCFE; }
body.woocommerce-order-pay .woocommerce-info,
body.woocommerce-order-pay .woocommerce-error,
body.woocommerce-order-pay .woocommerce-message { background: #EEF2FE !important; border: 1px solid #DCE4FA !important; color: #1E3A8A !important; border-radius: 12px; padding: 12px 16px; font-size: 13px; list-style: none; }
@media (max-width: 640px) {
  body.woocommerce-order-pay form#order_review table.shop_table th,
  body.woocommerce-order-pay form#order_review table.shop_table td { padding: 10px 12px; font-size: 13px; }
}
