/* YCW Portal RC41: renewal / EPP standard views and 'Snel naar' dark-mode polish.
   Presentation only. Native WHMCS domain forms and menu links are unchanged. */

/* Component surfaces: three coherent levels, without double outlines. */
body.ycw-portal .ycw-autorenew-page,
body.ycw-portal .ycw-epp-page {
  --ycw41-bg:#fff;
  --ycw41-subtle:#f7f9fc;
  --ycw41-border:#dfe7f1;
  --ycw41-text:#152846;
  --ycw41-muted:#61748f;
  --ycw41-hover:#fff4ec;
  color:var(--ycw41-text);
  font-family:Poppins,sans-serif;
  margin:0 0 26px;
  min-width:0;
}
html[data-ycw-theme='dark'] body.ycw-portal .ycw-autorenew-page,
html[data-ycw-theme='dark'] body.ycw-portal .ycw-epp-page {
  --ycw41-bg:#1b293d;
  --ycw41-subtle:#223249;
  --ycw41-border:#3a4d65;
  --ycw41-text:#e8f1fc;
  --ycw41-muted:#b5c4da;
  --ycw41-hover:#2e3d50;
}
body.ycw-portal .ycw-autorenew-hero,
body.ycw-portal .ycw-epp-header {
  display:flex; align-items:center; gap:18px; padding:22px 25px; min-width:0;
  background:var(--ycw41-bg)!important;
  border:1px solid var(--ycw41-border)!important;
  border-radius:18px; margin-bottom:14px;
  box-shadow:0 10px 28px rgba(13,29,50,.045);
}
body.ycw-portal .ycw-autorenew-hero-icon,
body.ycw-portal .ycw-epp-mark {
  display:grid; place-items:center; flex:0 0 57px; width:57px; height:57px;
  border-radius:15px; background:#fff1e8; color:#ff5900; font-size:24px;
}
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-autorenew-hero-icon,.ycw-epp-mark) {
  background:#3c302d!important; color:#ff985b!important;
}
body.ycw-portal .ycw-autorenew-hero-copy,
body.ycw-portal .ycw-epp-intro { flex:1; min-width:0; }
body.ycw-portal .ycw-autorenew-eyebrow,
body.ycw-portal .ycw-epp-eyebrow {
  display:block; margin-bottom:5px; letter-spacing:.08em; text-transform:uppercase;
  color:#ff5900; font-size:11px; font-weight:750;
}
body.ycw-portal #tabAutorenew .ycw-autorenew-hero h2,
body.ycw-portal .ycw-epp-header h2 {
  margin:0 0 6px!important; color:var(--ycw41-text)!important;
  font:750 clamp(21px,2vw,27px)/1.25 Poppins,sans-serif!important;
}
body.ycw-portal .ycw-autorenew-hero-copy p,
body.ycw-portal .ycw-epp-intro p {
  font:400 13px/1.7 Poppins,sans-serif; color:var(--ycw41-muted)!important;
  margin:0!important; overflow-wrap:anywhere;
}
body.ycw-portal :is(.ycw-autorenew-hero-copy,.ycw-epp-intro) p strong { color:var(--ycw41-text)!important; }
body.ycw-portal .ycw-autorenew-status-badge {
  margin-left:auto; flex:0 0 auto; display:inline-flex; gap:8px; align-items:center;
  min-height:36px; padding:8px 13px; border-radius:999px;
  font:700 12px/1.3 Poppins,sans-serif;
}
body.ycw-portal .ycw-autorenew-status-badge.is-enabled,
body.ycw-portal .ycw-autorenew-control-status.is-enabled { color:#14663e; background:#eaf8ef; }
body.ycw-portal .ycw-autorenew-status-badge.is-disabled,
body.ycw-portal .ycw-autorenew-control-status.is-disabled { color:#a4500c; background:#fff2e5; }
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-autorenew-status-badge,.ycw-autorenew-control-status).is-enabled { color:#99ebbb!important; background:#183b31!important; }
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-autorenew-status-badge,.ycw-autorenew-control-status).is-disabled { color:#ffd09b!important; background:#403023!important; }
body.ycw-portal .ycw-autorenew-layout {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:14px;align-items:stretch;}
body.ycw-portal .ycw-autorenew-explanation,
body.ycw-portal .ycw-autorenew-control,
body.ycw-portal .ycw-epp-result {
  min-width:0; border:1px solid var(--ycw41-border)!important;
  background:var(--ycw41-bg)!important; color:var(--ycw41-text)!important;
  border-radius:18px; padding:23px 25px;
  box-shadow:0 9px 24px rgba(13,29,50,.035);
}
body.ycw-portal .ycw-autorenew-heading {display:flex;align-items:center;gap:10px;margin:0 0 13px;}
body.ycw-portal .ycw-autorenew-heading i {color:#ff5900;font-size:19px;}
body.ycw-portal #tabAutorenew .ycw-autorenew-heading h3 {
  font:750 16px/1.4 Poppins,sans-serif!important; margin:0!important;
  color:var(--ycw41-text)!important;
}
body.ycw-portal .ycw-autorenew-info {
  font:400 13px/1.75 Poppins,sans-serif; color:var(--ycw41-muted)!important;
  overflow-wrap:anywhere;
}
body.ycw-portal .ycw-autorenew-info :is(p,div,span) {color:var(--ycw41-muted)!important;}
body.ycw-portal .ycw-autorenew-facts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px;}
body.ycw-portal .ycw-autorenew-fact {
  min-width:0; border:1px solid var(--ycw41-border);
  border-radius:12px; background:var(--ycw41-subtle)!important;
  padding:14px; display:flex; flex-direction:column; gap:7px;
}
body.ycw-portal .ycw-autorenew-fact span {font:500 11px/1.4 Poppins,sans-serif;color:var(--ycw41-muted)!important;}
body.ycw-portal .ycw-autorenew-fact strong {font:700 13px/1.5 Poppins,sans-serif;color:var(--ycw41-text)!important;overflow-wrap:anywhere;}
body.ycw-portal .ycw-autorenew-control {display:flex;flex-direction:column;align-items:stretch;gap:13px;}
body.ycw-portal .ycw-autorenew-control-eyebrow {color:var(--ycw41-muted)!important;font:700 11px/1.4 Poppins,sans-serif;letter-spacing:.06em;text-transform:uppercase;}
body.ycw-portal .ycw-autorenew-control-status {
  display:flex;gap:10px;align-items:center;width:fit-content;max-width:100%;
  padding:11px 14px;border-radius:12px;
}
body.ycw-portal .ycw-autorenew-control-status strong {font:750 16px/1.3 Poppins,sans-serif;color:inherit!important;}
body.ycw-portal .ycw-autorenew-control-status i {font-size:19px;}
body.ycw-portal .ycw-autorenew-control-description {font:400 12px/1.75 Poppins,sans-serif;color:var(--ycw41-muted)!important;margin:0!important;}
body.ycw-portal .ycw-autorenew-form {margin-top:auto!important;padding-top:11px;}
body.ycw-portal .ycw-autorenew-submit {
  display:block; width:100%; min-height:47px; max-width:100%;
  border-radius:11px!important; padding:13px 15px!important;
  font:700 12px/1.4 Poppins,sans-serif!important;white-space:normal;
  cursor:pointer;transition:background-color .15s,border-color .15s,box-shadow .15s;
}
body.ycw-portal .ycw-autorenew-submit-off {
  background:var(--ycw41-subtle)!important; border:1px solid var(--ycw41-border)!important; color:var(--ycw41-text)!important;
}
body.ycw-portal .ycw-autorenew-submit-off:hover {background:var(--ycw41-hover)!important;border-color:#ff975f!important;}
body.ycw-portal .ycw-autorenew-submit-on {background:#ff5900!important;border:1px solid #ff5900!important;color:white!important;}
body.ycw-portal .ycw-autorenew-submit-on:hover {background:#e84f00!important;border-color:#e84f00!important;}
body.ycw-portal .ycw-autorenew-submit:focus-visible {outline:3px solid rgba(255,89,0,.38);outline-offset:3px;}

/* Standard EPP code response. Keep original alert as provided by the core. */
body.ycw-portal .ycw-epp-result > .alert {margin:0!important;width:100%;border-radius:12px;overflow-wrap:anywhere;}
body.ycw-portal .ycw-epp-result :is(.alert,.alert p,.alert strong) {font-family:Poppins,sans-serif;line-height:1.65;}
html[data-ycw-theme='dark'] body.ycw-portal .ycw-epp-result .alert-warning {
  background:#3a3029!important;border-color:#785536!important;color:#f9d2a8!important;
}
html[data-ycw-theme='dark'] body.ycw-portal .ycw-epp-result .alert-danger {
  background:#40282d!important;border-color:#94505b!important;color:#ffd2d6!important;
}
/* Existing third-party module output, only common surfaces, never rewrite actions. */
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-domain-registrar-module,.ycw-domain-hook-output) :is(.panel,.well,.card) {
  background:#1b293d!important;border-color:#3a4d65!important;color:#e8f1fc!important;
}
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-domain-registrar-module,.ycw-domain-hook-output) :is(.panel-heading,.card-header) {
  background:#223249!important;border-color:#3a4d65!important;color:#e8f1fc!important;
}
html[data-ycw-theme='dark'] body.ycw-portal :is(.ycw-domain-registrar-module,.ycw-domain-hook-output) :is(.panel-heading h2,.panel-heading h3,.card-title) {color:#e8f1fc!important;}
/* Dark 'Snel naar': ONE outer panel, quiet dividers between links. */
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar {
  background:#1c2a3e!important;border:1px solid #3c506a!important;
  border-radius:16px!important;overflow:hidden!important;
  box-shadow:0 12px 34px rgba(0,0,0,.13)!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar > .panel-heading {
  background:#23334b!important;border:0!important;border-bottom:1px solid #344760!important;
  padding:14px 15px!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .panel-title,
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .panel-heading :is(span,strong,i) {
  color:#eef4ff!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group {
  background:#1c2a3e!important;padding:5px 0!important;margin:0!important;
  border:0!important;border-radius:0!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group > .list-group-item {
  display:flex;align-items:center;gap:9px;
  margin:0!important;padding:13px 15px!important;min-height:46px;
  background:transparent!important;color:#dce8f7!important;
  border:0!important;border-bottom:1px solid #304159!important;
  border-radius:0!important;box-shadow:none!important;
  font:500 12px/1.6 Poppins,sans-serif!important;
  text-decoration:none;white-space:normal;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group > .list-group-item:last-child {
  border-bottom:0!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group > .list-group-item:is(:hover,:focus-visible) {
  background:#2a3b52!important;color:#fff!important;outline:0;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group > .list-group-item.active {
  background:#332d30!important;color:#ff9b67!important;box-shadow:inset 3px 0 0 #ff5900!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group > .list-group-item:is(.disabled,[aria-disabled='true']) {opacity:.56;pointer-events:none;}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar :is(.panel-body,.panel-footer) {
  background:transparent!important;color:#bdcce0!important;border-color:#344760!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #ycw-context-sidebar .panel-sidebar .list-group-item .badge {margin-left:auto;}

/* RC41 finishing touch: dangerous service cancellation stays dark in dark mode.
   Buttons retain their native WHMCS URLs, labels, and disabled state. */
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareaproductdetails
  .ycw-service-detail-view .ycw-service-actions > a.btn-danger {
  background:#372830!important;
  border:1px solid #83515d!important;
  color:#ffd3d8!important;
  box-shadow:none!important;
}
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareaproductdetails
  .ycw-service-detail-view .ycw-service-actions > a.btn-danger :is(i,span) {
  color:inherit!important;
}
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareaproductdetails
  .ycw-service-detail-view .ycw-service-actions > a.btn-danger:is(:hover,:focus-visible) {
  background:#523039!important;
  border-color:#c87480!important;
  color:#fff!important;
  outline-offset:3px;
}
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareaproductdetails
  .ycw-service-detail-view .ycw-service-actions > a.btn-danger.disabled {
  opacity:.62;
  cursor:not-allowed;
}
/* The follow-up cancellation request uses the same subtle danger palette. */
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareacancelrequest
  form.form-stacked input.btn-danger {
  background:#372830!important;
  border:1px solid #83515d!important;
  color:#ffd3d8!important;
  border-radius:11px!important;
  min-height:44px;
}
html[data-ycw-theme='dark'] body.ycw-portal.template-clientareacancelrequest
  form.form-stacked input.btn-danger:is(:hover,:focus-visible) {
  background:#523039!important;
  border-color:#c87480!important;
  color:#fff!important;
}

@media(max-width:990px){
  body.ycw-portal .ycw-autorenew-layout {grid-template-columns:minmax(0,1fr);}
  body.ycw-portal .ycw-autorenew-hero {flex-wrap:wrap;}
  body.ycw-portal .ycw-autorenew-status-badge {margin-left:75px;}
}
@media(max-width:600px){
  body.ycw-portal .ycw-autorenew-hero,
  body.ycw-portal .ycw-epp-header {padding:18px;gap:12px;}
  body.ycw-portal .ycw-autorenew-hero-icon,
  body.ycw-portal .ycw-epp-mark {width:44px;height:44px;flex-basis:44px;border-radius:12px;font-size:21px;}
  body.ycw-portal .ycw-autorenew-hero-copy {flex-basis:calc(100% - 56px);}
  body.ycw-portal .ycw-autorenew-status-badge {margin:0;width:max-content;}
  body.ycw-portal .ycw-autorenew-explanation,
  body.ycw-portal .ycw-autorenew-control,
  body.ycw-portal .ycw-epp-result {padding:18px;}
  body.ycw-portal .ycw-autorenew-facts {grid-template-columns:minmax(0,1fr);}
}
@media(prefers-reduced-motion:reduce) {body.ycw-portal .ycw-autorenew-submit {transition:none;}}
