/**
 * Theme Name: NESMO CHILD
 * Description: Nesmo Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: nesmo
 */

/* Biðtími á vörusíðu */
.product .stock.available-on-backorder {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  background: #fdf0e8;
  border-left: 4px solid #ee7336;
  border-radius: 4px;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.4;
}

.product .stock.available-on-backorder::before {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  margin-top: 1px;
  background: #ee7336;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.product .stock.available-on-backorder .fe-bo strong {
  display: block;
  margin-bottom: 2px;
  color: #a84d12;
  font-size: 16px;
}

/* Biðtími í körfu */
.backorder_notification {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #fdf0e8;
  border-left: 3px solid #ee7336;
  border-radius: 3px;
  color: #a84d12;
  font-size: 13px;
  font-weight: 600;
}

/* Klassísk karfa og greiðslusíða */
dl.variation dt.variation-Afhending { display: none; }
dl.variation dd.variation-Afhending { margin: 6px 0 0; float: none; }

/* Cart/Checkout block */
.wc-block-components-product-details__afhending .wc-block-components-product-details__name { display: none; }

/* Sameiginlegt útlit */
dl.variation dd.variation-Afhending p,
.wc-block-components-product-details__afhending .wc-block-components-product-details__value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  background: #fdf0e8;
  border-left: 3px solid #ee7336;
  border-radius: 3px;
  color: #a84d12;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

dl.variation dd.variation-Afhending p::before,
.wc-block-components-product-details__afhending .wc-block-components-product-details__value::before {
  content: "";
  flex: 0 0 14px;
  height: 14px;
  background: #ee7336;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* =========================================================
 * Fyrirspurnarform (Gravity Forms #2) á vörusíðu
 * Allt er afmarkað við .backorder-form svo önnur form haldast óbreytt.
 * ========================================================= */

.backorder-form {
  --fe-accent: #ee7336;
  --fe-accent-hover: #d95f22;
  --fe-accent-dark: #a84d12;
  --fe-accent-tint: #fdf0e8;
  --fe-ink: #1a1a1a;
  --fe-muted: #666;
  --fe-line: #d8d4cf;
  --fe-panel: #f6f5f3;
  --fe-error: #c62828;

  margin: 28px 0 8px;
  padding: 28px;
  background: var(--fe-panel);
  border-radius: 6px;
  color: var(--fe-ink);
}

/* ---------- Varan sem fyrirspurnin varðar ---------- */

.backorder-form .backorder-product {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--fe-line);
  border-radius: 4px;
}

.backorder-form .backorder-product img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin: 0;
  object-fit: cover;
  border-radius: 3px;
}

.backorder-form .backorder-name {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.backorder-form .backorder-sku {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--fe-muted);
}

/* ---------- Fyrirsögn og lýsing ---------- */

.backorder-form .gform_heading {
  margin: 0 0 24px;
}

.backorder-form .gform_title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.2;
}

.backorder-form .gform_description {
  display: block;
  max-width: 60ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fe-muted);
}

.backorder-form .gform_required_legend {
  display: none;
}

/* ---------- Reitir ---------- */

.backorder-form .gform_fields {
  row-gap: 20px;
  column-gap: 16px;
}

.backorder-form .gfield_label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fe-ink);
}

.backorder-form .gfield_required {
  margin-left: 2px;
  color: var(--fe-accent-dark);
}

.backorder-form .gfield_description {
  padding: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fe-muted);
}

.backorder-form input[type="text"],
.backorder-form input[type="email"],
.backorder-form input[type="tel"],
.backorder-form input[type="number"],
.backorder-form textarea,
.backorder-form select {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--fe-ink);
  background: #fff;
  border: 1px solid var(--fe-line);
  border-radius: 4px;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}

.backorder-form textarea {
  min-height: 110px;
  resize: vertical;
}

.backorder-form ::placeholder {
  color: #9a958f;
  opacity: 1;
}

.backorder-form input:focus,
.backorder-form textarea:focus,
.backorder-form select:focus {
  outline: none;
  border-color: var(--fe-accent);
  box-shadow: 0 0 0 3px rgba(238, 115, 54, .25);
}

/* ---------- Val (radio) sem hnappar ---------- */

.backorder-form .gfield_radio {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backorder-form .gfield_radio .gchoice {
  position: relative;
  margin: 0;
}

.backorder-form .gfield_radio input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.backorder-form .gfield_radio label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  min-height: 42px;
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fe-ink);
  background: #fff;
  border: 1px solid var(--fe-line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}

.backorder-form .gfield_radio label:hover {
  border-color: #b8b2ab;
}

.backorder-form .gfield_radio input:checked + label {
  font-weight: 600;
  color: var(--fe-accent-dark);
  background: var(--fe-accent-tint);
  border-color: var(--fe-accent);
  box-shadow: inset 0 0 0 1px var(--fe-accent);
}

.backorder-form .gfield_radio input:focus-visible + label {
  outline: 2px solid var(--fe-accent);
  outline-offset: 2px;
}

/* ---------- Kaflaskil: „Upplýsingar um þig“ ---------- */

.backorder-form .gsection {
  margin-top: 8px;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--fe-line);
}

.backorder-form .gsection_title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Takki ---------- */

.backorder-form .gform_footer {
  margin: 24px 0 0;
  padding: 0;
}

.backorder-form .gform_footer .gform_button {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--fe-accent);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .15s;
}

.backorder-form .gform_footer .gform_button:hover {
  background: var(--fe-accent-hover);
}

.backorder-form .gform_footer .gform_button:focus-visible {
  outline: 3px solid var(--fe-ink);
  outline-offset: 2px;
}

/* ---------- Villur ---------- */

.backorder-form .gform_validation_errors {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: #fdecea;
  border: 0;
  border-left: 4px solid var(--fe-error);
  border-radius: 4px;
  box-shadow: none;
}

.backorder-form .gform_validation_errors > h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fe-error);
}

.backorder-form .gfield_error input,
.backorder-form .gfield_error textarea,
.backorder-form .gfield_error select {
  border-color: var(--fe-error);
}

.backorder-form .gfield_error .gfield_label {
  color: var(--fe-ink);
}

.backorder-form .gfield_validation_message,
.backorder-form .validation_message {
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--fe-error);
  background: none;
  border: 0;
}

/* ---------- Staðfesting eftir sendingu ---------- */

.backorder-form .gform_confirmation_message {
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
  border-left: 4px solid var(--fe-accent);
  border-radius: 4px;
}

/* ---------- Farsímar ---------- */

@media (max-width: 640px) {
  .backorder-form {
    padding: 20px 16px;
  }

  .backorder-form .gfield_radio .gchoice {
    flex: 1 1 auto;
  }

  .backorder-form .gfield_radio label {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .backorder-form * {
    transition: none !important;
  }
}