/*
 * Contact Factory and service purchase flow
 * Extracted from page-level and unified styles in QT-128.
 * Keep the source-layer order below: page foundations first, unified refinements last.
 */

/* Source layer: yf-home.css */

.yf-fc-plans{margin-top:14px}

.yf-fc-plan{cursor:default!important}

.yf-fc-plan small em{display:block;margin-top:5px;color:#9a3412;font-style:normal;font-weight:800}

.yf-fc-price-btn{flex:0 0 auto;min-width:86px;height:34px;padding:0 12px;border:1px solid rgba(255,106,0,.58);border-radius:8px;background:#fff7ed;color:#d95500;font-size:13px;font-weight:800;box-shadow:0 1px 2px rgba(15,23,42,.06);cursor:pointer}

.yf-fc-price-btn:hover{background:#fff1e6;border-color:#ff6a00}

@media (max-width:640px){
.yf-fc-plan{align-items:center!important;min-height:90px!important}
}

@media (max-width:640px){
.yf-fc-price-btn{min-width:82px;height:34px;font-size:12.5px}
}

.yf-fc-plan b .yf-service-category,.yf-fc-plan small .yf-service-category{display:inline!important;color:#dc2626!important}


/* Source layer: yf-detail.css */

html body .yf-detail-page #yfDetailInfo > .yf-detail-actions.yf-factory-contact-hidden > .yf-detail-factory-contact{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

.yf-factory-v2-mask{position:fixed;inset:0;z-index:2147483100;background:rgba(15,23,42,.56);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}

.yf-factory-v2-box{width:min(650px,100%);max-height:min(780px,calc(100vh - 24px));background:#fff;border-radius:17px;box-shadow:0 28px 80px rgba(15,23,42,.3);overflow:hidden;display:flex;flex-direction:column}

.yf-fc-head{height:57px;flex:0 0 auto;display:grid;grid-template-columns:38px 1fr 38px;align-items:center;padding:0 14px;border-bottom:1px solid #e8edf2}

.yf-fc-head b{text-align:center;font-size:17px}

.yf-fc-head button{width:34px;height:34px;border:0;border-radius:50%;background:#f1f5f9;font-size:25px;line-height:1;cursor:pointer}

.yf-fc-body{padding:16px;overflow:auto}

.yf-fc-status{margin-top:12px;padding:11px 13px;border-radius:10px;border:1px solid #dbeafe;background:#eff6ff;color:#1e4d8a}

.yf-fc-status.offline{border-color:#fed7aa;background:#fff7ed;color:#9a3412}

.yf-fc-status b,.yf-fc-status span{display:block}

.yf-fc-status b{font-size:13px;line-height:1.55}

.yf-fc-status span{margin-top:4px;font-size:11px;opacity:.85}

.yf-fc-preview-card{margin-top:12px;padding:12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;border:1px solid #f0d1bb;border-radius:11px;background:#fffaf6}

.yf-fc-preview-card b,.yf-fc-preview-card small,.yf-fc-preview-card em{display:block}

.yf-fc-preview-card small{margin-top:4px;color:#667085;font-size:12px;line-height:1.45}

.yf-fc-preview-card em{margin-top:6px;color:#ff6a00;font-size:11px;font-style:normal;font-weight:800}

.yf-fc-preview-card button{height:38px;padding:0 13px;border:0;border-radius:8px;background:#ff6a00;color:#fff;font-weight:800;cursor:pointer}

.yf-fc-plans{display:grid;gap:9px;}

.yf-fc-plan{width:100%;min-height:78px;padding:12px 13px;border:1px solid #dce3eb;border-radius:11px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;}

.yf-fc-plan.selected{border-color:#ff6a00;box-shadow:0 0 0 2px rgba(255,106,0,.14);background:#fffaf6}

.yf-fc-plan span{min-width:0}

.yf-fc-plan b,.yf-fc-plan small{display:block}

.yf-fc-plan b{font-size:14px;color:#263244}

.yf-fc-plan small{margin-top:4px;color:#6b7280;line-height:1.4}

.yf-fc-plan strong{white-space:nowrap;color:#dc2626}

.yf-fc-plan-extra{margin-top:11px}

.yf-fc-primary,.yf-fc-outline,.yf-fc-pay{width:100%;height:42px;margin-top:10px;border-radius:9px;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer}

.yf-fc-primary,.yf-fc-pay{border:0;background:#ff6a00;color:#fff}

.yf-fc-outline{border:1px solid #ff6a00;background:#fff;color:#ff6a00}

.yf-fc-order-error{margin-top:8px;color:#b91c1c;font-size:12px;line-height:1.45}

.yf-fc-payment{border:1px solid #e3e8ee;border-radius:11px;padding:12px;background:#fbfdff}

.yf-fc-payment>div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px dashed #dfe5ec;font-size:13px}

.yf-fc-payment label{display:block;margin-top:10px;font-size:12px;font-weight:800}

.yf-fc-payment input{width:100%;height:40px;box-sizing:border-box;margin-top:5px;border:1px solid #dbe2ea;border-radius:8px;padding:0 10px;font-size:16px}

.yf-fc-gate-msg{padding:24px 10px;text-align:center;line-height:1.7;color:#475569}

.yf-fc-gate-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}

.yf-factory-v2-mask.preview .yf-factory-v2-box{position:relative}

html.yf-lang-ar .yf-factory-v2-box,body.yf-lang-ar .yf-factory-v2-box{direction:rtl;text-align:right}

@media (max-width:640px){
.yf-factory-v2-mask{align-items:center;padding:8px}
}

@media (max-width:640px){
.yf-factory-v2-box{width:100%;max-height:calc(100dvh - 10px);border-radius:15px 15px 8px 8px}
}

@media (max-width:640px){
.yf-fc-head{height:52px}
}

@media (max-width:640px){
.yf-fc-body{padding:12px}
}

@media (max-width:640px){
.yf-fc-preview-card{grid-template-columns:1fr}
}

@media (max-width:640px){
.yf-fc-preview-card button{width:100%}
}

@media (max-width:640px){
.yf-fc-plan{padding:10px}
}

@media (max-width:640px){
.yf-fc-plan strong{font-size:12px}
}

@media (max-width:640px){
.yf-fc-gate-actions{grid-template-columns:1fr}
}

.yf-factory-v2-mask .yf-fc-status b{font-size:15.5px!important;line-height:1.6!important}

.yf-factory-v2-mask .yf-fc-status span{font-size:13.5px!important;line-height:1.5!important;opacity:.92!important}

.yf-factory-v2-mask .yf-fc-preview-card b{font-size:17px!important;line-height:1.4!important}

.yf-factory-v2-mask .yf-fc-preview-card small{font-size:14px!important;line-height:1.58!important}

.yf-factory-v2-mask .yf-fc-preview-card em{font-size:13.5px!important;line-height:1.45!important}

.yf-factory-v2-mask .yf-fc-preview-card button{font-size:14.5px!important}

.yf-factory-v2-mask .yf-fc-plan b{font-size:16px!important;line-height:1.4!important}

.yf-factory-v2-mask .yf-fc-plan small{font-size:14px!important;line-height:1.55!important}

.yf-factory-v2-mask .yf-fc-primary,
.yf-factory-v2-mask .yf-fc-outline,
.yf-factory-v2-mask .yf-fc-pay{font-size:14.5px!important}

.yf-factory-v2-mask .yf-fc-order-error{font-size:13.5px!important;line-height:1.55!important}

.yf-factory-v2-mask .yf-fc-payment>div{font-size:14px!important;line-height:1.45!important}

.yf-factory-v2-mask .yf-fc-payment label{font-size:13.5px!important;line-height:1.5!important}

.yf-factory-v2-mask .yf-fc-gate-msg{font-size:15px!important;line-height:1.7!important}

.yf-factory-v2-mask .yf-fc-head{
  background:#ff6a00!important;
  border-bottom-color:#ff6a00!important;
}

.yf-factory-v2-mask .yf-fc-head b{
  color:#fff!important;
}

.yf-factory-v2-mask .yf-fc-head button[data-fc-back],
.yf-factory-v2-mask .yf-fc-head button[data-fc-close]{
  background:#f2f5f8!important;
  color:#111827!important;
  box-shadow:0 1px 3px rgba(15,23,42,.10)!important;
}

.yf-factory-v2-mask .yf-fc-head button[data-fc-back]{
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:29px!important;
  font-weight:500!important;
  line-height:1!important;
  text-align:center!important;
}

.yf-factory-v2-mask.main .yf-fc-preview-card{
  display:block!important;
  padding:11px 12px!important;
}

.yf-factory-v2-mask.main .yf-fc-preview-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  margin-top:10px!important;
}

.yf-factory-v2-mask.main .yf-fc-preview-actions button,
.yf-factory-v2-mask.main .yf-fc-preview-actions a{
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  margin:0!important;
  padding:0 10px!important;
  box-sizing:border-box!important;
  border-radius:9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  text-decoration:none!important;
  font-size:14.5px!important;
  font-weight:800!important;
  line-height:1.2!important;
  cursor:pointer!important;
}

.yf-factory-v2-mask.main .yf-fc-preview-actions button{
  border:0!important;
  background:#ff6a00!important;
  color:#fff!important;
}

.yf-factory-v2-mask.main .yf-fc-preview-actions .wa{
  border:1px solid #22b455!important;
  background:#22b455!important;
  color:#fff!important;
}

.yf-factory-v2-mask.main .yf-fc-status{
  margin-top:10px!important;
}

@media (max-width:640px){
.yf-factory-v2-mask.main .yf-fc-preview-card{
    padding:10px!important;
  }
}

@media (max-width:640px){
.yf-factory-v2-mask.main .yf-fc-preview-actions{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:9px!important;
    margin-top:9px!important;
  }
}

@media (max-width:640px){
.yf-factory-v2-mask.main .yf-fc-preview-actions button,
  .yf-factory-v2-mask.main .yf-fc-preview-actions a{
    height:40px!important;
    padding:0 7px!important;
    font-size:14px!important;
  }
}

@media (max-width:640px){
.yf-factory-v2-mask.main .yf-fc-status{
    margin-top:9px!important;
  }
}


/* Source layer: yf-unified-ui.css */

@media (max-width:767px){
html.yf-lang-ar .yf-factory-v2-mask .yf-fc-head,
  body.yf-lang-ar .yf-factory-v2-mask .yf-fc-head{direction:rtl!important;}
}

html.yf-lang-ar .yf-factory-v2-mask [data-fc-back],
body.yf-lang-ar .yf-factory-v2-mask [data-fc-back]{transform:scaleX(-1)!important;}

@media (max-width:767px){
html body .yf-factory-v2-mask .yf-fc-head{
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr) 38px!important;
    align-items:center!important;
    direction:ltr!important;
    min-height:40px!important;
    height:40px!important;
    padding:3px 5px 3px 12px!important;
    box-sizing:border-box!important;
  }
}

@media (max-width:767px){
html body .yf-factory-v2-mask .yf-fc-head>b{
    min-width:0!important;
    text-align:left!important;
    padding-inline:4px!important;
    justify-self:stretch!important;
  }
}

@media (max-width:767px){
html.yf-lang-ar body .yf-factory-v2-mask .yf-fc-head,
  body.yf-lang-ar .yf-factory-v2-mask .yf-fc-head{
    direction:rtl!important;
    padding:3px 12px 3px 5px!important;
  }
}

@media (max-width:767px){
html.yf-lang-ar body .yf-factory-v2-mask .yf-fc-head>b,
  body.yf-lang-ar .yf-factory-v2-mask .yf-fc-head>b{
    text-align:right!important;
  }
}

html body .yf-fc-main-error:empty{display:none!important;margin:0!important;}

html body .yf-fc-preview-card{
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
}

html body .yf-fc-preview-decision{
  margin:7px 0 8px!important;
  color:#475569!important;
  font-size:12px!important;
  line-height:1.55!important;
}

html body .yf-fc-preview-card em{
  display:block!important;
  margin-top:4px!important;
  color:#64748b!important;
  font-size:11px!important;
  font-style:normal!important;
  font-weight:700!important;
}

html body .yf-fc-preview-card em strong{
  color:var(--yf-brand-orange)!important;
  font-size:12px!important;
}

@media (min-width:768px){
html body .yf-factory-v2-mask.preview .yf-factory-v2-box{
    width:min(760px,calc(100vw - 32px))!important;
    height:auto!important;
  }
}

@media (min-width:768px){
html body .yf-factory-v2-mask.preview.yf-preview-single .yf-factory-v2-box{
    max-height:min(690px,calc(100vh - 24px))!important;
  }
}

@media (min-width:768px){
html body .yf-factory-v2-mask.preview.yf-preview-double .yf-factory-v2-box{
    max-height:min(820px,calc(100vh - 24px))!important;
  }
}

@media (max-width:767px){
html body .yf-fc-preview-card{
    grid-template-columns:1fr!important;
  }
}

@media (max-width:767px){
html body .yf-fc-preview-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
}

html body .yf-fc-head [data-fc-back]{
  position:relative!important;
  width:30px!important;
  height:34px!important;
  min-width:30px!important;
  min-height:34px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:transparent!important;
  font-size:0!important;
  line-height:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}

@media (min-width:768px){
html body .yf-factory-v2-mask.preview.yf-preview-single .yf-factory-v2-box,
  html body .yf-factory-v2-mask.preview.yf-preview-double .yf-factory-v2-box{
    height:auto!important;
  }
}

html body .yf-factory-v2-mask.main .yf-fc-plan,
html body .yf-factory-v2-mask.main .yf-fc-preview-card,
html body .yf-factory-v2-mask.payment .yf-fc-payment{
  background:#fff!important;
  border:1px solid #dfe5ec!important;
  box-shadow:none!important;
}

html body .yf-factory-v2-mask.main .yf-fc-plan-group{
  border:1px solid #dce3eb!important;
  border-radius:11px!important;
  background:#fff!important;
  overflow:hidden!important;
}

html body .yf-factory-v2-mask.main .yf-fc-plan-group .yf-fc-plan{
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
}

html body .yf-factory-v2-mask.main .yf-fc-plan-group .yf-fc-plan + .yf-fc-plan{
  border-top:1px solid #e6ebf1!important;
}

html body .yf-factory-v2-mask.main .yf-fc-plan-group .yf-fc-plan-cost{
  min-height:58px!important;
}

html body .yf-factory-v2-mask.main .yf-fc-plan-group .yf-fc-plan-cost span{
  display:flex!important;
  align-items:center!important;
}

@media (max-width:640px){
html body .yf-factory-v2-mask.main .yf-fc-plan-group .yf-fc-plan-cost{
    min-height:54px!important;
  }
}



/* QT-137: shared manual-review note inside the detail payment fallback. */
.yf-fc-payment>.yf-payment-review-note{
  display:block!important;
  margin:0 0 10px!important;
  padding:10px 12px!important;
  border:1px solid rgba(255,106,0,.36)!important;
  border-radius:9px!important;
  background:#fff8f2!important;
  color:#8a3b13!important;
  font-size:12px!important;
  line-height:1.55!important;
}
.yf-fc-payment>.yf-payment-review-note p{margin:0!important}
.yf-fc-payment>.yf-payment-review-note p+p{margin-top:4px!important}
.yf-fc-payment>.yf-payment-review-note a{color:#128c43!important;font-weight:900!important;text-decoration:none!important}


/* QT-139: supplier-preview quota text and its fraction remain on one line. */
html body .yf-factory-v2-mask.main .yf-fc-preview-card em{
  display:flex!important;
  align-items:baseline!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
}
html body .yf-factory-v2-mask.main .yf-fc-preview-card em strong{
  display:inline!important;
  flex:0 0 auto!important;
  margin:0!important;
}
@media (max-width:420px){
  html body .yf-factory-v2-mask.main .yf-fc-preview-card em{
    font-size:12.5px!important;
  }
  html body .yf-factory-v2-mask.main .yf-fc-preview-card em strong{
    font-size:12.5px!important;
  }
}

/* QT-156: supplier-preview guidance uses the same readable size as the paid supplier description. */
html body .yf-factory-v2-mask.main .yf-fc-preview-decision{
  font-size:14px!important;
  line-height:1.55!important;
}


/* QT-158: keep China time and working hours on the same flowing line as the status message. */
html body .yf-factory-v2-mask.main .yf-fc-status b,
html body .yf-factory-v2-mask.main .yf-fc-status span{
  display:inline!important;
}
html body .yf-factory-v2-mask.main .yf-fc-status span{
  margin:0!important;
  margin-inline-start:6px!important;
}
