/* =====================================================================
   GHL Portal Styles — shared look for all dealer portal widgets
   Used by: GHL Pricelist, GHL Dealer Documents, GHL Bulk Order
   ===================================================================== */

:root{
	--ghl-blue:#0f4c81;
	--ghl-blue-dark:#0c3d68;
	--ghl-blue-light:#eef4fa;
	--ghl-border:#e3e6ea;
	--ghl-text:#333;
	--ghl-text-muted:#555;
	--ghl-text-faint:#777;
	--ghl-radius:6px;
	--ghl-btn-radius:3px;
	--ghl-btn-height:46px;
	--ghl-card-stripe:5px;
	--ghl-card-padding:24px 28px 26px;
	--ghl-section-gap:64px;
	--ghl-card-gap:32px;
}

/* ---------- Section (heading + intro + widget), used when a plugin renders its own heading ---------- */
.ghl-section{margin-top:var(--ghl-section-gap)}
.ghl-section__intro{margin:0 0 20px;color:var(--ghl-text-muted)}

/* ---------- Card ---------- */
.ghl-cards{display:flex;flex-direction:column;gap:var(--ghl-card-gap);margin:0 0 24px}
.ghl-card{box-sizing:border-box;width:100%;margin:0;padding:var(--ghl-card-padding);background:#fff;border:1px solid var(--ghl-border);border-left:var(--ghl-card-stripe) solid var(--ghl-blue);border-radius:var(--ghl-radius)}
.ghl-card *,.ghl-card *::before,.ghl-card *::after{box-sizing:border-box}
.ghl-card [hidden]{display:none !important}
.ghl-card__title{margin:0 0 8px;font-size:1.35em;font-weight:700;line-height:1.3;color:var(--ghl-blue)}
.ghl-card__text{margin:0 0 6px;color:var(--ghl-text-muted);line-height:1.5}
.ghl-card__meta{margin:0 0 16px;font-size:.9em;color:var(--ghl-text-faint)}
.ghl-card__actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ---------- Buttons (override theme button styling on purpose) ---------- */
.ghl-card .ghl-btn,.ghl-card a.ghl-btn,.ghl-card button.ghl-btn{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0 24px;height:var(--ghl-btn-height);font-size:15px;font-weight:600;line-height:1;border-radius:var(--ghl-btn-radius);border:1px solid var(--ghl-blue);background:var(--ghl-blue);color:#fff;text-decoration:none;cursor:pointer;box-shadow:none;text-transform:none;letter-spacing:0;background-image:none;white-space:nowrap;transition:background .15s,border-color .15s}
.ghl-card .ghl-btn:hover,.ghl-card a.ghl-btn:hover,.ghl-card button.ghl-btn:hover{background:var(--ghl-blue-dark);border-color:var(--ghl-blue-dark);color:#fff;text-decoration:none}
.ghl-card .ghl-btn--secondary{background:#fff;color:var(--ghl-blue)}
.ghl-card .ghl-btn--secondary:hover{background:var(--ghl-blue-light);border-color:var(--ghl-blue);color:var(--ghl-blue)}
.ghl-card .ghl-btn--small{height:34px;padding:0 14px;font-size:13px}
.ghl-card .ghl-btn[disabled],.ghl-card .ghl-btn.is-disabled{opacity:.55;cursor:default;pointer-events:none}

/* ---------- Notices inside cards ---------- */
.ghl-notice{margin:0 0 16px;padding:10px 14px;border-radius:4px;border-left:4px solid var(--ghl-blue);background:var(--ghl-blue-light);color:var(--ghl-text)}
.ghl-notice--error{border-color:#d63638;background:#fbeaea}
.ghl-notice--success{border-color:#00b386;background:#e8f7f1}
.ghl-notice--warn{border-color:#e6a800;background:#fff7dd}
.ghl-notice ul{margin:8px 0 0 18px}

/* ---------- Misc ---------- */
.ghl-muted{color:var(--ghl-text-faint);font-style:italic}

/* ---------- Responsive ---------- */
@media (max-width:720px){
	.ghl-card{padding:18px 16px 20px}
	.ghl-card__actions{flex-direction:column;align-items:stretch}
	.ghl-card__actions .ghl-btn{width:100%}
}

/* =====================================================================
   Quick Order (GHL Bulk Order) — widget-specific parts
   ===================================================================== */
.ghl-bo{margin-bottom:2em}
.ghl-bo-cart{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 16px;padding:12px 14px;border-radius:4px;border-left:4px solid #e6a800;background:#fff7dd;color:var(--ghl-text)}
.ghl-bo-cart-btns{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}
.ghl-bo-step{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:1.1em;color:var(--ghl-text)}
.ghl-bo-step-no{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:var(--ghl-blue);color:#fff;font-size:14px;font-weight:700;flex:0 0 26px}
.ghl-bo-input{display:flex;align-items:stretch;gap:0}
.ghl-bo-block{flex:1 1 0;min-width:0;display:flex;flex-direction:column}
.ghl-bo-block-title{margin:0 0 8px;font-size:1.05em;color:var(--ghl-text)}
.ghl-bo-or{flex:0 0 56px;display:flex;align-items:center;justify-content:center;position:relative}
.ghl-bo-or::before{content:"";position:absolute;top:0;bottom:0;left:50%;border-left:1px solid #d8dce1}
.ghl-bo-or span{position:relative;background:#fff;padding:4px 6px;color:#888;font-size:.9em;text-transform:uppercase;letter-spacing:.04em}
.ghl-bo-block-type .ghl-btn{align-self:flex-start}
.ghl-bo-paste-label{display:block;margin:0 0 6px;color:var(--ghl-text-muted);font-size:.95em}
.ghl-bo-paste-label code{background:#f3f4f6;padding:1px 5px;border-radius:3px;font-size:.92em}
.ghl-bo-paste{width:100%;flex:1 1 auto;font-family:monospace;font-size:14px;margin:0 0 10px;border:1px solid #cfd4d9;border-radius:4px;padding:8px;resize:vertical}
.ghl-bo-drop{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:120px;border:2px dashed #b5b5b5;border-radius:6px;padding:16px;text-align:center;color:var(--ghl-text-muted);background:#fafafa;cursor:pointer;transition:border-color .15s,background .15s}
.ghl-bo-drop.is-over{border-color:var(--ghl-blue);background:var(--ghl-blue-light)}
.ghl-bo-drop-icon{font-size:26px;line-height:1;color:var(--ghl-blue)}
.ghl-bo-drop-text{font-size:1em}
.ghl-bo-drop-hint{font-size:.85em;color:var(--ghl-text-faint);max-width:36em;line-height:1.4}
.ghl-bo-drop-hint+.ghl-bo-drop-hint{margin-top:-2px}
.ghl-bo-drop a{color:var(--ghl-blue);text-decoration:underline}
.ghl-bo-tpl{margin:10px 0 0;font-size:.9em;color:#666}
.ghl-bo-tpl a{color:var(--ghl-blue);text-decoration:underline}
.ghl-bo-list{margin-top:26px;padding-top:20px;border-top:1px solid var(--ghl-border)}
.ghl-bo-list .ghl-bo-step + .ghl-bo-actions{margin-top:0}
.ghl-bo-list-hint{margin:-4px 0 10px;color:#666;font-size:.92em}
.ghl-bo-preview{margin:0 0 22px;overflow-x:auto}
.ghl-bo-preview table{width:100%;border-collapse:collapse;font-size:14px;margin:0}
.ghl-bo-preview th,.ghl-bo-preview td{padding:6px 10px;border-bottom:1px solid #e5e5e5;text-align:left;vertical-align:middle}
.ghl-bo-preview th{background:#f3f4f6;font-weight:600}
.ghl-bo-preview td.qty,.ghl-bo-preview th.qty{text-align:right;white-space:nowrap;width:90px}
.ghl-bo-preview td.rm,.ghl-bo-preview th.rm{width:36px;text-align:center}
.ghl-bo-preview input.ghl-bo-qty{width:72px;padding:4px 6px;text-align:right;border:1px solid #cfd4d9;border-radius:3px;font-size:14px;margin:0}
.ghl-bo-preview tr.is-empty td{color:#888;font-style:italic;padding:14px 10px}
.ghl-bo-preview tr.is-bad td{color:#b32d2e}
.ghl-bo-preview tr.is-bad td.status{font-weight:600}
.ghl-bo-preview .ghl-bo-rm{background:none;border:0;padding:0 4px;font-size:20px;line-height:1;color:#888;cursor:pointer;box-shadow:none}
.ghl-bo-preview .ghl-bo-rm:hover{color:#d63638;background:none}
@media (max-width:720px){
	.ghl-bo-input{flex-direction:column}
	.ghl-bo-or{flex:0 0 auto;margin:14px 0}
	.ghl-bo-or::before{top:50%;bottom:auto;left:0;right:0;border-left:0;border-top:1px solid #d8dce1}
	.ghl-bo-drop{min-height:90px}
	.ghl-bo-cart{flex-direction:column;align-items:flex-start}
	.ghl-bo-cart-btns{margin-left:0}
}

/* =====================================================================
   Pricelist (GHL Pricelist) — widget-specific parts
   ===================================================================== */
.ghl-dealer-card{margin:1rem 0}
.ghl-card .ghl-dealer-btn{gap:.5rem}
.ghl-card .ghl-dealer-btn.is-working{opacity:.75;cursor:wait;pointer-events:none}
.ghl-dealer-btn__spinner{display:none;width:14px;height:14px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:ghlDealerSpin .6s linear infinite}
.ghl-dealer-btn.is-working .ghl-dealer-btn__spinner{display:inline-block}
@keyframes ghlDealerSpin{to{transform:rotate(360deg)}}
.ghl-dealer-card__status{margin-top:.9rem;font-size:.9rem;min-height:1.2em}
.ghl-dealer-card__status:empty{display:none}
.ghl-dealer-card__status.is-working{color:#6b7280}
.ghl-dealer-card__status.is-success{color:#166534}
.ghl-dealer-card__status.is-success a{color:#166534;font-weight:600}
.ghl-dealer-card__status.is-error{color:#b91c1c}

/* Dealer login form ([ghl_dealer_login]) */
.ghl-dealer-login{max-width:420px;margin:1.5rem 0;padding:1.5rem 1.75rem;background:#f7f8fa;border:1px solid #e1e5eb;border-radius:4px}
.ghl-dealer-login__title{margin:0 0 1rem;font-size:1.25rem}
.ghl-dealer-login .login-username,.ghl-dealer-login .login-password{margin-bottom:.75rem}
.ghl-dealer-login .login-username label,.ghl-dealer-login .login-password label{display:block;margin-bottom:.25rem;font-weight:500;font-size:.95rem}
.ghl-dealer-login .login-username input[type="text"],.ghl-dealer-login .login-password input[type="password"]{width:100%;padding:.55rem .75rem;border:1px solid #c3cad4;border-radius:3px;font-size:1rem;box-sizing:border-box}
.ghl-dealer-login .login-remember{margin:.75rem 0;font-size:.9rem}
.ghl-dealer-login .login-submit{margin-top:1rem}
.ghl-dealer-login .login-submit input[type="submit"]{padding:.65rem 1.25rem;background:var(--ghl-blue);color:#fff;border:0;border-radius:3px;font-size:1rem;font-weight:500;cursor:pointer;transition:background .15s}
.ghl-dealer-login .login-submit input[type="submit"]:hover{background:var(--ghl-blue-dark)}
.ghl-dealer-login__lost{margin-top:1rem;font-size:.875rem;text-align:right}
.ghl-dealer-login__lost a{color:var(--ghl-blue);text-decoration:none}
.ghl-dealer-login__lost a:hover{text-decoration:underline}
