/* CaptainGreek shared forms and partner registration.
 * Labels stay in document flow. Each component owns its layout and visibility.
 * Checkout, hosted payment controls, quantity widgets and header tools retain
 * their own presentation. No global brand tokens or generic card/message rules.
 */

body:not(.checkout-index-index) .page-main,
:where(#vendorregistration-component,.wk-vendor-account-container) {
    --cg-form-ink:#203b3b;
    --cg-form-muted:#5c6b65;
    --cg-form-line:#ccd8d0;
    --cg-form-focus:#29685d;
    --cg-form-error:#a13c35;
    --cg-form-surface:#fff;
    --cg-form-font:Inter,"Work Sans",Arial,sans-serif;
}

/* A restrained baseline for native storefront forms. Explicit text input
 * types avoid changing file/range/hidden/button controls and payment embeds. */
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) {
    min-width:0;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty):not(.additional):not(.no-label) > .label:not([hidden]):not([aria-hidden=true]):not(.no-display):not(.sr-only):not(.visually-hidden):not(.cg-visually-hidden):not(.screen-reader-only) {
    position:static;
    inset:auto;
    display:block;
    float:none;
    width:auto;
    margin:0 0 7px;
    padding:0;
    transform:none;
    color:var(--cg-form-ink);
    background:none;
    font:600 13px/1.45 var(--cg-form-font);
    text-align:start;
    text-transform:none;
    letter-spacing:normal;
    pointer-events:auto;
    overflow-wrap:anywhere;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty):not(.additional):not(.no-label) > .label:not([hidden]):not([aria-hidden=true]):not(.no-display):not(.sr-only):not(.visually-hidden):not(.cg-visually-hidden):not(.screen-reader-only) > span {
    padding:0;
    border:0;
    background:none;
    color:inherit;
    font:inherit;
    box-shadow:none;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control {
    float:none;
    width:100%;
    min-width:0;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input.input-text:not([type]),input[type=text],input[type=email],input[type=password],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=datetime-local],input[type=search],select,textarea):not(.qty):not(.item-qty):not([data-role=cart-item-qty]) {
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    min-height:46px;
    margin:0;
    padding:11px 13px;
    border:1px solid var(--cg-form-line);
    border-radius:10px;
    background-color:var(--cg-form-surface);
    color:var(--cg-form-ink);
    font:400 15px/1.45 var(--cg-form-font);
    box-shadow:0 1px 2px #183b3004;
    transition:border-color .15s,box-shadow .15s;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control select {
    padding-inline-end:32px;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control textarea {
    min-height:112px;
    height:auto;
    resize:vertical;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input.input-text:not([type]),input[type=text],input[type=email],input[type=password],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=datetime-local],input[type=search],select,textarea):not(.qty):not(.item-qty):not([data-role=cart-item-qty]):focus {
    border-color:var(--cg-form-focus);
    outline:2px solid var(--cg-form-focus);
    outline-offset:2px;
    box-shadow:0 0 0 4px #29685d12;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input,select,textarea):disabled {
    color:#65726c;
    background-color:#f0f3ef;
    cursor:not-allowed;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input,select,textarea)[readonly] {
    background-color:#f6f8f4;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input,select,textarea):is(.mage-error,[aria-invalid=true]) {
    border-color:var(--cg-form-error);
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input,select,textarea):is(.mage-error,[aria-invalid=true]):focus {
    outline-color:var(--cg-form-error);
    box-shadow:0 0 0 4px #a13c3512;
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field div.mage-error {
    margin:6px 0 0;
    color:var(--cg-form-error);
    font:400 12px/1.5 var(--cg-form-font);
}
body:not(.checkout-index-index) .page-main :where(form,.form) .field > .control > .note {
    margin-top:7px;
    color:var(--cg-form-muted);
    font-size:12px;
    line-height:1.55;
}
/* The account field grid sits between fieldset and field, outside Magento's
 * native direct-child required-marker selector. Use that same pseudo-element;
 * an explicit marker or an intentionally hidden label keeps its own markup. */
body.cgce-settings-active .cgce-settings-fields > .field:is(.required,._required):not(.choice):not(.no-label):not(.additional) > .label:not([hidden]):not([aria-hidden=true]):not(.no-display):not(.sr-only):not(.visually-hidden):not(.cg-visually-hidden):not(.screen-reader-only):not(:has(.required,em,abbr))::after {
    content:"*";
    margin-inline-start:4px;
    color:#a84539;
    font-size:13px;
    font-weight:600;
}

/* Partner registration aliases are local for existing registration widgets. */
:where(#vendorregistration-component,.wk-vendor-account-container) {
    --cg-font:Inter,"Work Sans",Arial,sans-serif;
    --cg-blue:#203b3b;
    --cg-accent:#29685d;
    --cg-text:#203b3b;
    --cg-sub:#5c6b65;
    --cg-surface:#fff;
    --cg-line:#dce5dd;
    color:#203b3b;
    font-family:var(--cg-font);
}
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    max-width:1040px;
    margin:0 auto 28px;
    padding:0 16px;
}
/* Layout rules must never reveal a step or section hidden by its controller. */
:where(#vendorregistration-component,.wk-vendor-account-container,.cg-membership-wrap,.cg-embedded-page) [hidden],
.wkvr-stepper[hidden],
.wkvr-stepper [hidden] { display:none!important; }
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset > .field {
    min-width:0;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset > .form-label,
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset > .cg-span-full,
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset > .cg-badge-wrap {
    grid-column:1/-1;
    min-width:0;
    width:100%;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .fieldset > h2.form-label {
    margin:0 0 4px;
    padding:0 0 12px;
    border-bottom:1px solid #dce5dd;
    color:#203b3b;
    font-size:20px;
    font-weight:650;
    line-height:1.4;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .field > .control {
    box-sizing:border-box;
    width:100%;
    min-width:0;
}
:where(#vendorregistration-component,.wk-vendor-account-container) input[type=file] {
    box-sizing:border-box;
    max-width:100%;
    padding:10px;
    border:1px dashed #9bb7aa;
    border-radius:10px;
    background:#f8fbf6;
    color:#203b3b;
    font:400 13px/1.5 var(--cg-font);
}
:where(#vendorregistration-component,.wk-vendor-account-container) input[type=file]::file-selector-button {
    min-height:36px;
    margin-inline-end:10px;
    padding:7px 12px;
    border:1px solid #b8cbbd;
    border-radius:7px;
    background:#fff;
    color:#245c58;
    font:600 12px/1.4 var(--cg-font);
    cursor:pointer;
}

/* Registration stepper: plain CSS, no LESS interpolation or nested selectors. */
.wkvr-stepper {
    --cg-step-ink:#203b3b;
    --cg-step-accent:#29685d;
    margin:24px 0 30px;
    font-family:Inter,"Work Sans",Arial,sans-serif;
}
.wkvr-stepper .stepper-progress {
    height:6px;
    margin-bottom:18px;
    overflow:hidden;
    border-radius:20px;
    background:#e2eae2;
}
.wkvr-stepper .stepper-progress-bar {
    height:100%;
    width:0;
    border-radius:inherit;
    background:linear-gradient(110deg,#182f3d,#397765);
    transition:width .25s;
}
.wkvr-stepper .stepper-list {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    margin:0;
    padding:0 0 4px;
    overflow-x:auto;
    list-style:none;
    scrollbar-width:thin;
}
.wkvr-stepper .stepper-item {
    position:relative;
    flex:1 1 0;
    min-width:90px;
    margin:0;
    text-align:center;
}
.wkvr-stepper .stepper-item:not(:last-child)::after {
    content:"";
    position:absolute;
    z-index:0;
    top:21px;
    left:calc(50% + 28px);
    width:calc(100% - 44px);
    height:2px;
    background:#dce5dd;
}
.wkvr-stepper .stepper-item.completed:not(:last-child)::after { background:#5f8b77; }
.wkvr-stepper .stepper-link {
    position:relative;
    z-index:1;
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    gap:9px;
    padding:0 4px;
    color:var(--cg-step-ink);
    text-decoration:none;
}
.wkvr-stepper .stepper-link:hover,
.wkvr-stepper .stepper-link:focus { transform:none!important; }
.wkvr-stepper .stepper-circle {
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    border:1px solid #cbdacf;
    border-radius:13px;
    background:#f0f5ed;
    color:#49665c;
    font-size:15px;
    font-weight:650;
}
.wkvr-stepper .stepper-label {
    display:block;
    max-width:140px;
    color:#5c6b65;
    font-size:12px;
    line-height:1.45;
    overflow-wrap:anywhere;
}
.wkvr-stepper .active .stepper-circle,
.wkvr-stepper .completed .stepper-circle {
    border-color:#37685d;
    background:linear-gradient(125deg,#182f3d,#29685d);
    color:#fffdf7;
}
.wkvr-stepper .active .stepper-label { color:#203b3b; font-weight:650; }
.wkvr-stepper .stepper-link:focus-visible { outline:2px solid #29685d; outline-offset:3px; border-radius:5px; }

/* Existing registration progress and information components. */
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress {
    position:relative;
    width:100%;
    height:16px;
    overflow:hidden;
    border-radius:20px;
    background:#e2eae2;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress__track,
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress__fill { position:absolute; inset:0; border-radius:inherit; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress__fill {
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(110deg,#182f3d,#397765);
    transition:width .25s;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress__label {
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    color:#fff;
    font-size:11px;
    font-weight:700;
    line-height:1;
    pointer-events:none;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-card,
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-badge-card {
    box-sizing:border-box;
    width:100%;
    margin:10px 0 18px;
    padding:18px;
    border:1px solid #dce5dd;
    border-radius:13px;
    background:linear-gradient(135deg,#fffefa,#f4f8ef);
    color:#203b3b;
    font-size:13px;
    line-height:1.65;
}
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-ins-title,.cg-shopurl-title,.cg-badge-card__title) {
    margin:0 0 8px;
    color:#203b3b;
    font-size:16px;
    font-weight:650;
    line-height:1.45;
}
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-shopurl-intro,.cg-badge-card__intro,.cg-badge-card__privacy) {
    margin:0 0 10px;
    color:#5c6b65;
    text-align:start;
}
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-shopurl-points,.cg-badge-list,.cg-insurance ul) {
    margin:8px 0 0;
    padding-inline-start:20px;
    column-gap:28px;
}
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-shopurl-points,.cg-badge-list,.cg-insurance ul) li { margin:5px 0 9px; break-inside:avoid; }
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-holder,.cg-insurance .cg-li-holder) {
    margin:0 0 14px;
    padding:13px 15px;
    border:1px solid #d4e1d4;
    border-radius:10px;
    background:#edf4e9;
    color:#203b3b;
}
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-holder-kicker { margin-bottom:4px; color:#5c6b65; font-size:11px; font-weight:650; letter-spacing:.05em; text-transform:uppercase; }
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-holder-name,.cg-insurance .cg-li-holder > strong) { display:block; margin-bottom:4px; font-weight:650; }
:where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-holder-addr,.cg-insurance .cg-addr) { display:block; margin-top:6px; font-style:normal; font-weight:500; line-height:1.6; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr)); gap:12px; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req { display:flex; align-items:flex-start; gap:11px; min-width:0; padding:13px; border:1px solid #dce5dd; border-radius:10px; background:#fff; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req-icon { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:9px; color:#fff; background:linear-gradient(125deg,#182f3d,#29685d); font-size:13px; font-weight:650; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req-title { margin-bottom:4px; font-weight:650; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req-body { min-width:0; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-req-body p { margin:0; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-footnote { margin-top:12px; color:#5c6b65; font-size:12px; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-badge-chip { display:inline-block; margin-inline-start:5px; padding:2px 8px; border:1px solid #cbdcc9; border-radius:20px; background:#edf4e9; color:#245c58; font-size:11px; font-weight:600; }
:where(#vendorregistration-component,.wk-vendor-account-container) .cg-url-preview { margin-top:10px; padding:11px 13px; border:1px dashed #9bb7aa; border-radius:9px; background:#f4f8ef; color:#245c58; font-weight:600; overflow-wrap:anywhere; }

/* Membership components retain their own layout; generic .cg-card is never
 * styled outside registration, including product and wishlist cards. */
.cg-membership-wrap { max-width:1400px; margin:16px auto 28px; padding:0 16px; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-pricing-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:22px; margin-top:18px; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan { display:flex; flex-direction:column; position:relative; min-width:0; padding:18px; border:1px solid #dce5dd; border-radius:13px; background:linear-gradient(135deg,#fff,#f8faf5); overflow:visible; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan::after { content:""; display:block; clear:both; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan .mgz-element-column { float:none!important; width:auto!important; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan .mgz-element-inner { width:100%!important; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan > .mgz-element-column { flex:1 1 auto; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan-actions { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0 4px; }
:where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-plan .cg-btn { width:100%; justify-content:center; }
.cg-embedded-page .cg-pricing-grid :is(.mgz-container,.mgz-element-row,.mgz-element-column) { box-sizing:border-box; width:auto!important; max-width:none!important; float:none!important; display:block!important; }
.cg-embedded-page .cg-pricing-grid :is(.mgz-container,.mgz-element-row,.mgz-element-column)[hidden] { display:none!important; }
.cg-embedded-page .cg-plan .mgz-element-row .inner-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
.cg-embedded-page :is(.page-title-wrapper,.breadcrumbs) { display:none; }

@media (min-width:900px) {
    :where(#vendorregistration-component,.wk-vendor-account-container) .fieldset { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 24px; }
    :where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-badge-list,.cg-insurance ul) { column-count:2; }
}
@media (max-width:1199px) {
    :where(.cg-membership-wrap,.cg-embedded-page,#vendorregistration-component,.wk-vendor-account-container) .cg-pricing-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:767px) {
    body:not(.checkout-index-index) .page-main :where(form,.form) .field:not(.choice):not(.qty) > .control :is(input.input-text:not([type]),input[type=text],input[type=email],input[type=password],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=datetime-local],input[type=search],select,textarea):not(.qty):not(.item-qty):not([data-role=cart-item-qty]) { font-size:16px; }
    :where(#vendorregistration-component,.wk-vendor-account-container) .fieldset { padding-inline:0; gap:16px; }
    :where(#vendorregistration-component,.wk-vendor-account-container) :is(.cg-card,.cg-badge-card) { padding:15px; }
    .wkvr-stepper .stepper-label { font-size:11px; }
    .cg-embedded-page .cg-plan .mgz-element-row .inner-content { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
    body:not(.checkout-index-index) .page-main :where(form,.form) .field > .control :is(input,select,textarea),
    .wkvr-stepper .stepper-progress-bar,
    :where(#vendorregistration-component,.wk-vendor-account-container) .cg-progress__fill { transition:none; }
}
@media (forced-colors:active) {
    body:not(.checkout-index-index) .page-main :where(form,.form) .field > .control :is(input,select,textarea):focus { outline-color:Highlight; }
    .wkvr-stepper .active .stepper-circle { border:2px solid Highlight; }
}
