/* ===== YC Payment (Front) - Outstanding Modal ===== */

.yc-oa-alert{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:12px;
  margin:12px 0;
  display:flex;
  gap:12px;
  align-items:center;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.yc-oa-alert__icon{font-size:20px; line-height:1;}
.yc-oa-alert__body{flex:1; min-width:0;}
.yc-oa-alert__title{font-weight:700; margin-bottom:2px;}
.yc-oa-alert__desc{font-size:13px; opacity:.85;}
.yc-oa-alert__actions{display:flex; align-items:center; gap:8px;}

.yc-btn{
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
  line-height:1.2;
}
.yc-btn--primary{
  background:#0d6efd;
  border-color:#0d6efd;
  color:#fff;
}
.yc-btn--secondary{
  background:#f3f4f6;
}
.yc-btn--ghost{
  background:#fff;
}

.yc-modal{position:fixed; inset:0; z-index:9999;}
.yc-modal[hidden]{display:none!important;}
.yc-modal__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.45);}
.yc-modal__dialog{
  position:relative;
  margin:6vh auto;
  width:min(720px, calc(100% - 24px));
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  overflow:hidden;
}
.yc-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.yc-modal__title{font-weight:800;}
.yc-modal__x{
  border:0;
  background:transparent;
  font-size:22px;
  cursor:pointer;
  line-height:1;
}
.yc-modal__content{
  padding:14px 16px;
  max-height:70vh;
  overflow:auto;
  min-height: 300px;
}
.yc-modal__footer{
  padding:12px 14px;
  border-top:1px solid rgba(0,0,0,.08);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* ===== YC Payment - Checkout payment method logos =====
   (Rendered by theme when PaymentOption::setLogo() is set)
*/
#checkout-payment-step img.payment-option-logo,
.payment-options img.payment-option-logo {
  max-height: 26px;
  width: auto;
  vertical-align: middle;
  margin-inline-start: 10px;
}

.yc-oa-item{
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
}
.yc-oa-item__meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.yc-oa-link{text-decoration:none;}
.yc-oa-ref{opacity:.75; margin-right:6px; font-size:12px;}
.yc-oa-item__actions{position:relative;}
.yc-oa-caret{margin-right:8px; opacity:.7;}

.yc-oa-paymenu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:220px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  box-shadow:0 10px 25px rgba(0,0,0,.12);
  padding:6px;
  z-index:2;
}
.yc-oa-paylink{
  display:block;
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color:inherit;
}
.yc-oa-paylink:hover{background:#f3f4f6;}

@media (max-width: 576px){
  .yc-oa-item__meta{flex-direction:column; align-items:flex-start;}
  .yc-oa-item__actions{width:100%;}
  .yc-btn--ghost{width:100%;}
  .yc-oa-paymenu{left:0; right:0; min-width:auto;}
}

/* Highlight helper when we auto-scroll to the receipt section */
.yc-focus{
  outline: 2px solid rgba(0,0,0,.12);
  box-shadow: 0 0 0 6px rgba(0,0,0,.05);
  border-radius: 12px;
}

/* ===== YC Payment v1.1.7.2 - gateway health check / automatic failover ===== */
.yc-gateway-check-inline{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-inline-start:10px;
  font-size:12px;
  font-weight:700;
  opacity:.78;
  vertical-align:middle;
}
.yc-gateway-spinner{
  width:16px;
  height:16px;
  min-width:16px;
  display:inline-block;
  border:2px solid rgba(0,0,0,.16);
  border-top-color:currentColor;
  border-radius:50%;
  animation:ycGatewaySpin .7s linear infinite;
}
.yc-payment-checking{
  position:relative;
  opacity:.88;
}
.yc-payment-checking button[type="submit"]{
  pointer-events:none;
}
.yc-payment-checking button[type="submit"]::after{
  content:'…';
  margin-inline-start:3px;
}
.yc-gateway-redirect-status{
  width:min(520px,calc(100% - 28px));
  margin:14vh auto 0;
  padding:18px 20px;
  display:flex;
  align-items:center;
  gap:13px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  direction:rtl;
  text-align:right;
}
.yc-gateway-redirect-status .yc-gateway-spinner{
  width:22px;
  height:22px;
  min-width:22px;
  border-width:3px;
}
.yc-gateway-redirect-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.yc-gateway-redirect-copy strong{
  font-size:14px;
}
.yc-gateway-redirect-copy span{
  font-size:12px;
  opacity:.72;
}
@keyframes ycGatewaySpin{to{transform:rotate(360deg)}}


/* ===== YC Payment v1.1.7.3 - all-online-gateways-down fallback ===== */
.yc-gateway-unavailable{
  width:min(560px,calc(100% - 28px));
  margin:10vh auto 0;
  padding:22px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  box-shadow:0 12px 34px rgba(0,0,0,.08);
  direction:rtl;
  text-align:right;
}
.yc-gateway-unavailable__icon{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
  border:2px solid currentColor;
  border-radius:50%;
  font-size:24px;
  font-weight:800;
  opacity:.72;
}
.yc-gateway-unavailable__copy strong{
  display:block;
  margin-bottom:7px;
  font-size:17px;
}
.yc-gateway-unavailable__copy p{
  margin:0;
  line-height:1.9;
  font-size:14px;
  opacity:.78;
}
.yc-gateway-unavailable__actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:18px;
}
.yc-gateway-unavailable__actions .btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}
.yc-gateway-unavailable__hint{
  display:block;
  margin-top:12px;
  line-height:1.8;
  opacity:.65;
}
@media (max-width:576px){
  .yc-gateway-unavailable{
    margin-top:5vh;
    padding:18px;
  }
  .yc-gateway-unavailable__actions{
    flex-direction:column;
  }
  .yc-gateway-unavailable__actions .btn{
    width:100%;
  }
}


/* ===== YC Payment v1.1.7.5 - gateway status helpers / standard checkout ===== */
.yfc-payment-card.yc-gateway-health-failed{
  border-color:#fecaca!important;
  background:#fffafa!important;
}
.yfc-payment-card.yc-gateway-health-ok{
  border-color:#bbf7d0!important;
  background:#fbfffc!important;
}
.yc-gateway-check-inline.is-error{
  color:#b42318;
  opacity:1;
}
.yc-gateway-check-inline.is-success{
  color:#15803d;
  opacity:1;
}
.yc-fast-gateway-fallback{
  width:100%;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  margin:2px 0 12px;
  border:1px solid #fed7aa;
  border-radius:14px;
  background:#fff7ed;
  color:#9a3412;
  direction:rtl;
  text-align:right;
}
.yc-fast-gateway-fallback__icon{
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid currentColor;
  border-radius:50%;
  font-weight:900;
  font-size:17px;
}
.yc-fast-gateway-fallback__copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.yc-fast-gateway-fallback__copy strong{
  font-size:13px;
  color:#7c2d12;
}
.yc-fast-gateway-fallback__copy span{
  font-size:12px;
  line-height:1.8;
  color:#9a3412;
}
.yc-fast-gateway-fallback__button{
  white-space:nowrap;
}
@media(max-width:767px){
  .yc-fast-gateway-fallback{
    grid-template-columns:auto 1fr;
  }
  .yc-fast-gateway-fallback__button{
    grid-column:1/-1;
    width:100%;
  }
}
