/* Iranipay 1.7.3 – uncluttered 3-step checkout, consistent totals, no forced auth-card scrolling */
[hidden],.iranipay-site [hidden]{display:none!important}
/* The order dialog never closes on backdrop clicks or Escape; its X remains the dismissal control. */
.iranipay-site .ip-dialog:has(#ip-trade-create){width:min(730px,calc(100vw - 30px));max-width:730px;box-sizing:border-box;max-height:none;overflow:visible;padding:22px 26px 24px;border-radius:23px;overscroll-behavior:contain}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading{margin-bottom:14px;padding-left:50px;min-height:0}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading h2{margin:3px 0;font-size:21px;line-height:1.45}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading p{margin:3px 0;font-size:13px;line-height:1.7}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading .ip-paypal-tag{margin-top:3px}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading .ip-btn{min-height:32px;padding:4px 10px;font-size:12px}
.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-dialog-close{top:13px;left:15px;z-index:5}
.iranipay-site #ip-trade-create{display:grid;gap:12px;max-height:none;min-width:0}
.iranipay-site #ip-trade-create .ip-step-indicators{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}
.iranipay-site #ip-trade-create[data-has-invoice="0"] .ip-step-indicators{grid-template-columns:repeat(2,minmax(0,1fr))}
.iranipay-site #ip-trade-create .ip-step-indicators button{min-width:0;padding:10px 5px;min-height:43px;font-size:13px;line-height:1.4;cursor:default}
.iranipay-site #ip-trade-create .ip-order-step:not([hidden]){display:grid;gap:10px;min-width:0}
.iranipay-site #ip-trade-create .ip-order-step h3{font-size:17px;line-height:1.6;margin:0 0 2px}
.iranipay-site #ip-trade-create .ip-order-step>label{display:grid;gap:5px;font-size:14px;font-weight:800;color:var(--ip-title)}
.iranipay-site #ip-trade-create input,.iranipay-site #ip-trade-create textarea{min-height:42px;padding:9px 13px;border-radius:12px;min-width:0;width:100%;background:var(--bg);color:var(--ip-title)}
.iranipay-site #ip-trade-create textarea{min-height:65px;max-height:100px;resize:vertical}
.iranipay-site #ip-trade-create .ip-step-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:0}
.iranipay-site #ip-trade-create .ip-step-actions>.ip-btn{min-height:44px;padding:9px 19px}
.iranipay-site #ip-trade-create .ip-invoice-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;background:transparent;border:0;padding:0;margin:0}
.iranipay-site #ip-trade-create .ip-invoice-fields label{display:grid;gap:4px;min-width:0;font-size:13px;font-weight:800;color:var(--ip-title)}
.iranipay-site #ip-trade-create .ip-invoice-fields label:first-child,.iranipay-site #ip-trade-create .ip-invoice-fields .ip-invoice-extra{grid-column:1/-1}
.iranipay-site #ip-trade-create .ip-invoice-fields .ip-optional{display:inline;color:var(--muted);font-size:12px;font-weight:500;margin-inline-start:6px}
.iranipay-site #ip-trade-create .ip-invoice-fields input{min-width:0;direction:ltr;text-align:left}
.iranipay-site #ip-trade-create .ip-invoice-fields textarea{direction:rtl;text-align:right}
.iranipay-site #ip-trade-create .ip-order-range{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.iranipay-site #ip-trade-create .ip-range-stat{background:var(--bg);border:1px solid var(--edge);border-radius:13px;padding:11px 12px;min-width:0;display:flex;flex-direction:column;gap:3px}
.iranipay-site #ip-trade-create .ip-range-stat small{font-size:12px;color:var(--ip-title-soft);font-weight:600}
.iranipay-site #ip-trade-create .ip-range-stat strong{font-size:15px;color:var(--ip-title);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right;direction:ltr;unicode-bidi:isolate}
/* Quote uses only four clear rows; amount/unit stay together when the modal narrows. */
.iranipay-site #ip-estimate{display:grid;gap:0;background:var(--bg);border:1px solid var(--edge);border-radius:17px;padding:14px 17px;min-width:0}
.iranipay-site #ip-estimate .ip-invoice-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 8px;border-bottom:1px solid var(--edge)}
.iranipay-site #ip-estimate .ip-invoice-head h3{font-size:17px;margin:0;color:var(--ip-title)}
.iranipay-site #ip-estimate .ip-invoice-head>span{font-size:12px;color:var(--muted)}
.iranipay-site #ip-estimate .ip-invoice-line{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:nowrap;padding:10px 2px;border-bottom:1px solid var(--edge);min-width:0}
.iranipay-site #ip-estimate .ip-invoice-line>span{font-size:13px;white-space:nowrap;color:var(--ip-title-soft)}
.iranipay-site #ip-estimate .ip-invoice-line>b{font-size:15px;white-space:nowrap;text-align:left;color:var(--ip-title)}
.iranipay-site #ip-estimate .ip-money-value{direction:rtl;unicode-bidi:isolate;white-space:nowrap;font-variant-numeric:tabular-nums}
.iranipay-site #ip-estimate .ip-money-value small{font-size:.75em;font-weight:650;color:inherit}
.iranipay-site #ip-estimate .ip-estimate-total{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin:11px 0 4px;border:0;border-radius:11px;background:var(--mint-soft);flex-wrap:nowrap}
.iranipay-site #ip-estimate .ip-estimate-total span{color:var(--ip-title);font-size:14px;font-weight:800;white-space:nowrap}
.iranipay-site #ip-estimate .ip-estimate-total strong{font-size:20px;color:var(--ip-title);text-align:left}
.iranipay-site #ip-estimate .ip-shortage-box{display:flex;gap:12px;align-items:flex-start;padding:11px 13px;border-radius:12px;border:1px solid #f2b9ab;background:#fff4f1;margin-top:9px;color:#8c352d;min-width:0;max-width:100%}
.iranipay-site #ip-estimate .ip-shortage-icon{display:grid;place-items:center;background:#fbe0d8;border-radius:50%;font-weight:900;flex:0 0 28px;width:28px;height:28px}
.iranipay-site #ip-estimate .ip-shortage-content{min-width:0;flex:1;display:grid;gap:2px}
.iranipay-site #ip-estimate .ip-shortage-content strong{font-size:13px;color:#8c352d;font-weight:800}
.iranipay-site #ip-estimate .ip-shortage-content p{font-size:12px;line-height:1.7;color:#9b483c;margin:0}
.iranipay-site #ip-estimate .ip-shortage-amount{font-size:17px;color:#8c352d;direction:rtl;unicode-bidi:isolate;white-space:nowrap}
.iranipay-site #ip-estimate .ip-shortage-amount small{font-size:12px;color:inherit}
.iranipay-site #ip-estimate .ip-shortage-link{margin-top:9px;min-height:42px;padding:8px;font-size:13px}
.iranipay-site #ip-estimate .ip-balance-sufficient{font-size:13px;margin-top:10px;color:var(--ip-accent);font-weight:750}
.iranipay-site #ip-trade-create .ip-check{display:flex;align-items:center;gap:8px;margin:0;line-height:1.65;font-size:13px}
.iranipay-site #ip-trade-create .ip-check input[type="checkbox"]{width:17px;min-width:17px;height:17px;min-height:17px;flex:0 0 17px;margin:0}
/* Registration should grow naturally rather than trapping visitors in a nested scroll container. */
.iranipay-site .ip-auth{height:auto!important;min-height:0!important;overflow:visible!important;align-items:stretch}
.iranipay-site .ip-auth-card{height:auto!important;overflow:visible!important;scrollbar-gutter:auto!important;padding:clamp(19px,2.6vw,32px)!important}
.iranipay-site .ip-auth-form{gap:11px}
.iranipay-site .ip-auth-form h2{margin:3px 0 1px}
.iranipay-site .ip-auth-form>p{margin:0 0 4px;font-size:13px}
.iranipay-site .ip-auth-form label{gap:4px}
.iranipay-site .ip-auth-form input:not([type=checkbox]){min-height:42px}
.iranipay-site .ip-auth-switch{margin-bottom:14px}
.iranipay-site .ip-auth-form .ip-check{margin:5px 0}
@media(max-width:800px){.iranipay-site .ip-dialog:has(#ip-trade-create){padding:17px 16px 19px}.iranipay-site #ip-trade-create .ip-step-indicators button{font-size:12px;padding:8px 3px}.iranipay-site #ip-trade-create .ip-order-range{grid-template-columns:1fr 1fr}.iranipay-site #ip-trade-create .ip-range-stat:last-child{grid-column:1/-1}.iranipay-site .ip-auth-info{padding:20px!important}.iranipay-site .ip-auth-orbs{margin-top:10px}}
@media(max-width:540px){.iranipay-site .ip-dialog:has(#ip-trade-create){width:calc(100vw - 18px);padding:13px 12px 16px}.iranipay-site #ip-trade-create .ip-step-indicators button{font-size:11px}.iranipay-site #ip-trade-create .ip-order-range{grid-template-columns:1fr 1fr}.iranipay-site #ip-trade-create .ip-invoice-fields{grid-template-columns:1fr}.iranipay-site #ip-estimate .ip-invoice-line>span,.iranipay-site #ip-estimate .ip-invoice-line>b{font-size:12px}.iranipay-site #ip-estimate .ip-estimate-total strong{font-size:17px}.iranipay-site .ip-dialog:has(#ip-trade-create) .ip-modal-heading{padding-left:37px}.iranipay-site #ip-estimate .ip-estimate-total{padding-inline:9px}}
/* Only small screens / short windows scroll when the screen physically cannot fit the form. */
@media(max-height:700px){.iranipay-site .ip-dialog:has(#ip-trade-create){max-height:calc(100dvh - 18px);overflow-y:auto;overflow-x:hidden}}
.iranipay-site .ip-dialog .ip-order-conditions{border-radius:11px;border:1px solid var(--edge);background:var(--mint-soft);padding:11px 13px;font-size:13px;color:var(--ip-title);margin:-3px 0 12px;line-height:1.85;white-space:pre-wrap}

/* v1.7.4: Order validation stays inside the native dialog's top layer. */
.iranipay-site #ip-trade-create .ip-order-validation-error{
 display:flex;align-items:flex-start;gap:10px;
 border:1px solid #edaa9e;border-inline-start:4px solid #c54d39;
 background:#fff2ed;color:#853025;border-radius:13px;
 padding:12px 15px;font-size:14px;font-weight:750;line-height:1.9;
 text-align:right;direction:rtl;overflow-wrap:anywhere;word-break:normal;
}
.iranipay-site #ip-trade-create .ip-order-validation-error::before{
 content:'!';display:inline-grid;place-items:center;border-radius:50%;
 height:22px;width:22px;min-width:22px;background:#f9d6cf;color:#a53023;
 font-weight:900;font-family:Arial,sans-serif;margin-top:2px;
}
.iranipay-site #ip-trade-create .ip-order-validation-error[hidden]{display:none!important}
.iranipay-site #ip-trade-create [aria-invalid="true"]{
 border-color:#ce5548!important;box-shadow:0 0 0 2px rgba(206,85,72,.12)!important;
}
.iranipay-site .ip-dialog .ip-modal-notice{position:relative;margin:0 0 12px;
 padding:12px 16px;border:1px solid #9bd9c8;background:#e2f7f1;
 color:#0b5d50;border-radius:12px;font-weight:750;line-height:1.85;
 z-index:10;text-align:right;overflow-wrap:anywhere;}
.iranipay-site .ip-dialog .ip-modal-notice.error{background:#fff2ed;border-color:#edaa9e;color:#853025}
.iranipay-site .ip-dialog .ip-modal-notice[hidden]{display:none!important}
:root[data-theme="dark"] .iranipay-site #ip-trade-create .ip-order-validation-error,
:root[data-theme="dark"] .iranipay-site .ip-dialog .ip-modal-notice.error{
 background:#3c2528;color:#ffd5ce;border-color:#b95d53;
}
:root[data-theme="dark"] .iranipay-site #ip-trade-create .ip-order-validation-error::before{
 background:#63353a;color:#ffe3dd;
}
:root[data-theme="dark"] .iranipay-site .ip-dialog .ip-modal-notice:not(.error){
 background:#163b38;border-color:#277b6f;color:#baf6df;
}
@media(max-width:540px){
 .iranipay-site #ip-trade-create .ip-order-validation-error{font-size:13px;padding:10px 12px;}
}


/* IraniPay 1.7.5 — invoice alerts, edit-offer modal, notifications, auth trust note */
.iranipay-site .ip-offer-preview-card .ip-preview-note{margin:0;color:var(--muted);font-size:12px;line-height:1.9}
.iranipay-site .ip-offer-preview-card .ip-estimate-total{display:flex;align-items:center;justify-content:space-between;gap:12px}
.iranipay-site .ip-shortage-inline{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;margin-top:10px;padding:12px 14px;border-radius:13px;border:1px solid #efb3a6;background:#fff3ef;color:#91382c}
.iranipay-site .ip-shortage-inline-text{font-size:13px;line-height:1.85;min-width:0}
.iranipay-site .ip-shortage-inline-amount{font-size:15px;white-space:nowrap;color:#91382c;direction:rtl;unicode-bidi:isolate}
.iranipay-site .ip-shortage-inline-amount small{font-size:12px;color:inherit}
.iranipay-site .ip-shortage-inline-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 14px;border-radius:11px;background:#fff;border:1px solid #ebb3a5;color:#8a3428;font-weight:800;white-space:nowrap}
.iranipay-site .ip-shortage-inline-link:hover{border-color:#d87c6c;background:#fff8f6}
.iranipay-site .ip-notice-row{align-items:center}
.iranipay-site .ip-notice-content{min-width:0;flex:1}
.iranipay-site .ip-notice-action{flex:0 0 auto;margin-inline-start:18px;padding-inline-start:14px}
.iranipay-site .ip-notice-action .ip-btn{min-width:72px}
.iranipay-site .ip-dialog:has(#ip-edit-offer){width:min(740px,calc(100vw - 32px));max-width:740px;max-height:none;overflow:visible;padding:24px 28px 26px}
.iranipay-site .ip-dialog:has(#ip-edit-offer) .ip-dialog-close{top:14px;left:16px;z-index:3}
.iranipay-site .ip-dialog:has(#ip-edit-offer) .ip-modal-heading{padding-left:52px;margin-bottom:12px}
.iranipay-site .ip-dialog:has(#ip-edit-offer) .ip-edit-offer-note{margin:0 0 12px}
.iranipay-site .ip-dialog:has(#ip-edit-offer) #ip-edit-offer{display:grid;gap:12px;max-height:none;overflow:visible}
.iranipay-site .ip-auth-security-note{border:1px solid rgba(16,184,155,.26);background:var(--mint-soft);color:var(--ip-title);border-radius:12px;padding:10px 12px;font-size:13px;font-weight:700;line-height:1.9}
.iranipay-site .ip-auth-security-note b{direction:ltr;unicode-bidi:isolate}
.iranipay-site .ip-auth-note{margin:0;color:var(--muted);font-size:12px;line-height:1.9}
@media(max-width:640px){
 .iranipay-site .ip-shortage-inline{grid-template-columns:1fr;align-items:stretch}
 .iranipay-site .ip-shortage-inline-link{width:100%}
 .iranipay-site .ip-dialog:has(#ip-edit-offer){width:calc(100vw - 18px);padding:18px 14px 18px}
}
@media(max-height:700px){
 .iranipay-site .ip-dialog:has(#ip-edit-offer){max-height:calc(100dvh - 18px);overflow-y:auto;overflow-x:hidden}
}
:root[data-theme="dark"] .iranipay-site .ip-shortage-inline{background:#392528;border-color:#b55f52;color:#ffd7cf}
:root[data-theme="dark"] .iranipay-site .ip-shortage-inline-amount{color:#ffd7cf}
:root[data-theme="dark"] .iranipay-site .ip-shortage-inline-link{background:#4a2e31;border-color:#b55f52;color:#ffe8e1}

/* v1.7.7 — readable official domain in both auth forms */
.iranipay-site .ip-auth-security-note a{direction:ltr;unicode-bidi:isolate;display:inline-block;font-weight:900;color:var(--ip-accent);text-decoration:underline;text-underline-offset:3px;word-break:break-all;}
.iranipay-site .ip-auth-security-note a:hover{color:var(--ip-title);}
