/* SolarQuote – cerere de ofertă */
:root {
  --sq-primary: #259b53;
  --sq-badge: #f59e0b;
  --sq-text: #1f2937;
  --sq-muted: #6b7280;
  --sq-border: #e5e7eb;
  --sq-bg-soft: #f7f8fa;
  --sq-radius: 10px;
  --sq-danger: #dc2626;
}

.sq-page [hidden], .sq-panel [hidden] { display: none !important; }

/* ---------- "Solicită ofertă" button ---------- */
.sq-button-wrap { width: 100%; }
.sq-qty-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--sq-text); }

.sq-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 24px;
  border: 0; border-radius: 8px;
  background: var(--sq-primary); color: #fff;
  font-family: inherit; font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  cursor: pointer; transition: filter .15s, transform .05s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.sq-add-btn:hover { filter: brightness(1.07); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.sq-add-btn:active { transform: translateY(1px); }
.sq-add-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sq-primary) 40%, transparent); outline-offset: 2px; }
.sq-add-btn__icon { flex: 0 0 auto; }
.sq-add-btn.is-loading { opacity: .75; pointer-events: none; }
.sq-add-btn.is-loading .sq-add-btn__icon { animation: sq-pulse .8s ease-in-out infinite alternate; }
.sq-add-btn.is-done { background: #15803d; }
@keyframes sq-pulse { to { opacity: .3; } }

/* ---------- Quantity stepper ---------- */
.sq-qty {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--sq-border); border-radius: 8px; overflow: hidden; background: #fff;
}
.sq-qty--lg { margin-bottom: 12px; }
.sq-qty__btn {
  width: 32px; border: 0; background: var(--sq-bg-soft); color: var(--sq-text);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.sq-qty--lg .sq-qty__btn { width: 44px; font-size: 22px; }
.sq-qty__btn:hover { background: #eceef1; }
.sq-qty__input {
  width: 46px; height: 32px; border: 0; text-align: center;
  font: inherit; font-weight: 600; color: var(--sq-text); background: #fff;
  -moz-appearance: textfield; appearance: textfield;
}
.sq-qty--lg .sq-qty__input { width: 64px; height: 44px; font-size: 17px; }
.sq-qty__input::-webkit-outer-spin-button,
.sq-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sq-qty__input:focus { outline: none; background: #f0fdf4; }

/* ---------- Header icon ---------- */
.sq-cart-widget { display: inline-flex; }
.sq-cart-trigger {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  color: var(--sq-text); text-decoration: none; padding: 4px;
}
.sq-cart-trigger:hover { color: var(--sq-primary); }
.sq-cart-trigger__count {
  position: absolute; top: -2px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--sq-badge); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.sq-cart-trigger__count.is-bump { animation: sq-bump .4s ease; }
@keyframes sq-bump { 40% { transform: scale(1.35); } }

/* ---------- Off-canvas panel ---------- */
.sq-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(17, 24, 39, .45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.sq-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999;
  width: min(420px, 100vw); background: #fff; color: var(--sq-text);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: -8px 0 30px rgba(0,0,0,.15);
}
body.sq-panel-open { overflow: hidden; }
body.sq-panel-open .sq-overlay { opacity: 1; visibility: visible; }
body.sq-panel-open .sq-panel { transform: none; }

.sq-panel__body { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sq-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--sq-border);
}
.sq-panel__title { font-size: 18px; font-weight: 700; }
.sq-panel__close {
  border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--sq-muted); cursor: pointer; padding: 0 4px;
}
.sq-panel__close:hover { color: var(--sq-text); }
.sq-panel__items { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px; }
.sq-panel__foot { padding: 16px 20px 20px; border-top: 1px solid var(--sq-border); background: #fff; }
.sq-panel__loading { padding: 40px 20px; text-align: center; color: var(--sq-muted); }

.sq-empty { color: var(--sq-muted); padding: 16px 0; margin: 0; border-bottom: 1px solid var(--sq-border); }

/* ---------- Items ---------- */
.sq-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--sq-border);
  transition: opacity .2s;
}
.sq-item.is-busy { opacity: .5; pointer-events: none; }
.sq-item__img {
  display: block; width: 64px; height: 64px; border: 1px solid var(--sq-border); border-radius: 8px; overflow: hidden; background: #fff;
}
.sq-item__img img { width: 100%; height: 100%; object-fit: contain; }
.sq-item__info { min-width: 0; }
.sq-item__name {
  display: block; color: var(--sq-text); font-weight: 600; font-size: 14px; line-height: 1.35; text-decoration: none;
}
.sq-item__name:hover { color: var(--sq-primary); }
.sq-item__ref { font-size: 12px; color: var(--sq-muted); margin-top: 2px; }
.sq-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.sq-item__price { text-align: right; line-height: 1.2; }
.sq-item__price strong { display: block; font-size: 15px; }
.sq-item__price small { color: var(--sq-muted); font-size: 12px; }
.sq-item__remove {
  border: 0; background: transparent; color: #9ca3af; cursor: pointer; padding: 4px; border-radius: 6px;
}
.sq-item__remove:hover { color: var(--sq-danger); background: #fef2f2; }

/* ---------- Summary / CTA ---------- */
.sq-summary { font-size: 15px; }
.sq-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sq-summary__row--muted { color: var(--sq-muted); }
.sq-summary__row--total { font-weight: 700; font-size: 16px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--sq-border); }
.sq-note { font-size: 12px; color: var(--sq-muted); margin: 8px 0 0; }

.sq-cta {
  display: block; margin-top: 16px; padding: 13px 18px; border-radius: 8px;
  background: var(--sq-primary); color: #fff !important; text-align: center; text-decoration: none !important;
  font-weight: 600; font-size: 16px; transition: filter .15s;
}
.sq-cta:hover { filter: brightness(1.07); }
.sq-cta.is-disabled { background: color-mix(in srgb, var(--sq-primary) 35%, #fff); pointer-events: none; }
.sq-cta--inline { display: inline-block; }

/* ---------- Request page ---------- */
.sq-page { color: var(--sq-text); margin-bottom: 40px; }
.sq-page__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sq-page__summary { position: sticky; top: 20px; }
.sq-page__empty { text-align: center; }
.sq-card { background: #fff; border: 1px solid var(--sq-border); border-radius: var(--sq-radius); padding: 24px; }
.sq-card__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; margin: 26px 0 14px; color: var(--sq-text); text-transform: none;
}
.sq-card__title:first-of-type, .sq-list .sq-card__title { margin-top: 0; }
.sq-list__count { color: var(--sq-muted); font-weight: 500; }
.sq-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sq-primary); color: #fff; font-size: 14px;
}

.sq-entity { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.sq-entity__opt { margin: 0; cursor: pointer; }
.sq-entity__opt input { position: absolute; opacity: 0; pointer-events: none; }
.sq-entity__opt span {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border: 2px solid var(--sq-border); border-radius: 8px;
  font-weight: 600; transition: border-color .15s, background .15s, color .15s;
}
.sq-entity__opt:hover span { border-color: #cbd5e1; }
.sq-entity__opt input:checked + span {
  border-color: var(--sq-primary); color: var(--sq-primary);
  background: color-mix(in srgb, var(--sq-primary) 7%, #fff);
}
.sq-entity__opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--sq-primary) 35%, transparent); }

.sq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.sq-grid[data-sq-pj] { margin-bottom: 4px; }
.sq-field { display: flex; flex-direction: column; min-width: 0; }
.sq-field--full { grid-column: 1 / -1; }
.sq-field label { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.sq-field label em { color: var(--sq-danger); font-style: normal; }
.sq-field input[type="text"], .sq-field input[type="email"], .sq-field input[type="tel"],
.sq-field select, .sq-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #d1d5db; border-radius: 8px;
  font: inherit; font-size: 15px; color: var(--sq-text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.sq-field select { height: auto; }
.sq-field textarea { resize: vertical; min-height: 100px; }
.sq-field input:focus, .sq-field select:focus, .sq-field textarea:focus {
  outline: none; border-color: var(--sq-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sq-primary) 18%, transparent);
}
.sq-field.has-error input, .sq-field.has-error select, .sq-field.has-error textarea { border-color: var(--sq-danger); }
.sq-error { color: var(--sq-danger); font-size: 13px; margin-top: 4px; }
.sq-field--check { margin-top: 18px; }
.sq-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.sq-field--check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sq-primary); flex: 0 0 auto; }
.sq-submit { margin-top: 22px; font-size: 18px; }
.sq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sq-success { max-width: 620px; margin: 0 auto; text-align: center; padding: 40px 28px; }
.sq-success__icon {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--sq-primary) 12%, #fff); color: var(--sq-primary);
}
.sq-success h2 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }

/* ---------- Toast ---------- */
.sq-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100000;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--sq-text); color: #fff; padding: 12px 18px; border-radius: 8px;
  font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px);
}
.sq-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sq-toast.is-error { background: var(--sq-danger); }

@media (max-width: 991px) {
  .sq-page__grid { grid-template-columns: 1fr; }
  .sq-page__summary { position: static; order: -1; }
}
@media (max-width: 575px) {
  .sq-card { padding: 18px 16px; }
  .sq-grid, .sq-entity { grid-template-columns: 1fr; }
  .sq-add-btn { font-size: 17px; min-height: 56px; }
}

/* ---------- Theme overrides (the theme right-aligns / floats form labels) ---------- */
.sq-page, .sq-page *, .sq-page *::before, .sq-page *::after,
.sq-panel, .sq-panel *, .sq-panel *::before, .sq-panel *::after { box-sizing: border-box; }
.sq-page { width: 100%; max-width: 100%; }
.sq-page .sq-page__grid > * { min-width: 0; }
.sq-page .sq-field label {
  display: block !important; float: none !important; width: 100% !important; max-width: none !important;
  text-align: left !important; justify-content: flex-start !important;
  padding: 0 !important; margin: 0 0 6px !important;
  font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--sq-text);
}
.sq-page .sq-field--check label {
  display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400;
}
.sq-page .sq-field input[type="text"], .sq-page .sq-field input[type="email"], .sq-page .sq-field input[type="tel"],
.sq-page .sq-field select, .sq-page .sq-field textarea {
  float: none; max-width: none; margin: 0; text-align: left;
}
.sq-page .sq-card__title, .sq-page .sq-summary__row, .sq-page .sq-item { text-align: left; }
.sq-item__price--request { color: var(--sq-muted); font-size: 13px; font-style: italic; }
