/* Anka Quote — form page UI */

/* Hide theme page title on quote form pages (plugin provides its own hero). */
body.ankaquba-form-page .wp-block-post-title,
body.ankaquba-form-page .entry-header .entry-title,
body.ankaquba-form-page .entry-title {
  display: none !important;
}

/* Prevent horizontal scroll from viewport breakout. */
body.ankaquba-form-page {
  overflow-x: clip;
}

/*
 * Full-bleed shell: escape Elementor/theme content columns without the
 * left:50% / -50vw shift bug. Vertical margins separate nav / footer.
 * Content uses the full shell width (only horizontal padding), not a ~1280px card.
 */
.ankaquba-page.alignwide,
.ankaquba-page {
  --ankaquba-ink: #121417;
  --ankaquba-muted: #5c6570;
  --ankaquba-line: #e6e8eb;
  --ankaquba-soft: #f4f5f7;
  --ankaquba-surface: #ffffff;
  --ankaquba-radius: 14px;
  --ankaquba-pad-x: clamp(16px, 3.5vw, 48px);
  --ankaquba-content-max: 100%;
  box-sizing: border-box;
  color: var(--ankaquba-ink);
  background: var(--ankaquba-soft);
  border-radius: 0;
  overflow: hidden;
  padding-bottom: 8px;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(28px, 4vw, 56px);
  /* Lock theme inheritance (TT5 body/h2 are oversized for this UI). */
  font-size: 15px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
}

/*
 * Classic themes already place the shortcode in a full-width content row.
 * The 100vw breakout then shifts the block; stay in-flow unless Elementor
 * owns the page (it still needs the breakout to escape nested columns).
 */
body.ankaquba-form-page:not(.elementor-page) .ankaquba-page {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Elementor often clips breakout with overflow:hidden on widgets/sections. */
.elementor-element:has(> .elementor-widget-container .ankaquba-page),
.elementor-widget:has(.ankaquba-page),
.elementor-widget-container:has(.ankaquba-page),
.elementor-shortcode:has(.ankaquba-page) {
  overflow: visible !important;
  max-width: none !important;
  width: 100% !important;
}

.e-con:has(.ankaquba-page),
.e-con-inner:has(.ankaquba-page) {
  overflow: visible !important;
  max-width: none !important;
}

.ankaquba-page :where(h1, h2, h3, h4, p, label, span, a, button, input, textarea) {
  font-family: inherit;
  letter-spacing: normal;
}

.ankaquba-page__hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(247, 146, 0, 0.28), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(145deg, #101214 0%, #1b1f24 52%, #15181c 100%);
  color: #fff;
  padding: 48px var(--ankaquba-pad-x) 44px;
  margin: 0 0 24px;
}

.ankaquba-page__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.ankaquba-page__hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--ankaquba-content-max);
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.ankaquba-page__hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  font-weight: 800;
}

.ankaquba-page__hero p {
  margin: 0;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.ankaquba-page__container {
  max-width: var(--ankaquba-content-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--ankaquba-pad-x) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.ankaquba-page__box {
  background: var(--ankaquba-surface);
  border: 1px solid var(--ankaquba-line);
  border-radius: var(--ankaquba-radius);
  padding: 26px;
  box-shadow: 0 10px 30px rgba(16, 18, 20, 0.04);
}

.ankaquba-page__form-box {
  position: sticky;
  top: 24px;
}

.ankaquba-page__box-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ankaquba-line);
}

.ankaquba-page__box-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ankaquba-ink);
}

.ankaquba-page__muted {
  margin: 0;
  color: var(--ankaquba-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.ankaquba-page__clear-btn {
  border: 1px solid var(--ankaquba-line);
  background: #fff;
  color: var(--ankaquba-ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ankaquba-page__clear-btn:hover {
  border-color: var(--ankaquba-accent);
  color: #9a5a00;
  background: #fff8ef;
}

.ankaquba-page__product-list {
  display: grid;
  gap: 12px;
}

.ankaquba-page__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ankaquba-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--ankaquba-soft) 100%);
  flex-wrap: nowrap;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ankaquba-page__item:hover {
  border-color: #d7dbe0;
  transform: translateY(-1px);
}

.ankaquba-page__item-info {
  min-width: 0;
  flex: 1 1 auto;
}

.ankaquba-page__item-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ankaquba-ink);
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  letter-spacing: normal;
}

.ankaquba-page__item-meta {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ankaquba-muted);
  margin-bottom: 4px;
}

.ankaquba-page__item-link {
  font-size: 12px;
  color: #9a5a00;
  font-weight: 650;
  text-decoration: none;
}

.ankaquba-page__item-link:hover {
  color: var(--ankaquba-accent);
}

.ankaquba-page__item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Compact qty stepper — beat theme/Elementor "input/button { width:100% }" rules. */
.ankaquba-page__qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
  border: 1px solid var(--ankaquba-line);
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  box-sizing: border-box;
}

.ankaquba-page__qty button {
  box-sizing: border-box;
  flex: 0 0 28px;
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none;
  background: var(--ankaquba-soft);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--ankaquba-ink);
}

.ankaquba-page__qty button:hover {
  background: #ebecef;
}

.ankaquba-page__qty input,
.ankaquba-page__qty input[type="number"] {
  box-sizing: border-box;
  flex: 0 0 36px;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  background: transparent !important;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ankaquba-page__qty input[type="number"]::-webkit-outer-spin-button,
.ankaquba-page__qty input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ankaquba-page__item-remove {
  border: none;
  background: transparent;
  color: #98a0a9;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.ankaquba-page__item-remove:hover {
  color: #c0392b;
  background: #fdecea;
}

.ankaquba-page__empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--ankaquba-muted);
  background:
    linear-gradient(180deg, rgba(247, 146, 0, 0.05), transparent 55%),
    var(--ankaquba-soft);
  border-radius: 12px;
  border: 1px dashed #d7dbe0;
}

.ankaquba-page__empty a {
  color: #9a5a00;
  font-weight: 800;
  text-decoration: none;
}

.ankaquba-page__form {
  display: grid;
  gap: 2px;
}

.ankaquba-field {
  margin-bottom: 14px;
}

.ankaquba-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ankaquba-ink);
}

.ankaquba-field input,
.ankaquba-field textarea {
  width: 100%;
  border: 1px solid var(--ankaquba-line);
  border-radius: 11px;
  padding: 13px 15px;
  font-size: 15px;
  background: #fff;
  color: var(--ankaquba-ink);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ankaquba-field input:focus,
.ankaquba-field textarea:focus {
  outline: none;
  border-color: var(--ankaquba-accent);
  box-shadow: 0 0 0 3px rgba(247, 146, 0, 0.18);
}

.ankaquba-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Primary CTA — form submit. */
.ankaquba-page .ankaquba-submit,
.ankaquba-submit {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 22px;
  border: 2px solid var(--ankaquba-accent, #f79200) !important;
  border-radius: 999px;
  background: #121417 !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  filter: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ankaquba-page .ankaquba-submit:hover,
.ankaquba-page .ankaquba-submit:focus,
.ankaquba-submit:hover,
.ankaquba-submit:focus {
  background: var(--ankaquba-accent, #f79200) !important;
  background-image: none !important;
  border-color: var(--ankaquba-accent, #f79200) !important;
  color: var(--ankaquba-on-accent, #fff) !important;
  filter: none;
  transform: translateY(-1px);
  box-shadow: none;
}

.ankaquba-page .ankaquba-submit:disabled,
.ankaquba-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
  color: #fff !important;
}

.ankaquba-form-msg {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}

.ankaquba-form-msg.is-success,
.ankaquba-form-msg.is-error,
.ankaquba-form-msg.is-warning {
  display: block;
}

.ankaquba-form-msg.is-success {
  background: #e8f7ee;
  color: #1e7e45;
  border: 1px solid #b8e6c8;
}

.ankaquba-form-msg.is-error {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6c0;
}

.ankaquba-form-msg.is-warning {
  background: #fff8e6;
  color: #7a5b00;
  border: 1px solid #f0d58c;
}

.ankaquba-consent {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--ankaquba-radius, 14px);
  background: var(--ankaquba-soft, #f4f5f7);
  border: 1px solid var(--ankaquba-line, #e6e8eb);
}

.ankaquba-consent__notice {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ankaquba-muted, #5c6570);
}

.ankaquba-consent__notice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ankaquba-consent__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ankaquba-ink, #121417);
  font-weight: 500;
}

.ankaquba-consent__check input {
  margin: 3px 0 0;
  flex-shrink: 0;
}

.ankaquba-consent__label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ankaquba-consent__req {
  color: #b42318;
  text-decoration: none;
  border: 0;
  font-weight: 700;
}

@media (max-width: 900px) {
  .ankaquba-page__container {
    grid-template-columns: 1fr;
  }

  .ankaquba-page__form-box {
    position: static;
  }

  .ankaquba-page__hero-inner {
    text-align: center;
  }

  .ankaquba-page__hero p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .ankaquba-page__hero {
    padding: 40px 16px 36px;
  }

  .ankaquba-page__box {
    padding: 18px;
  }

  .ankaquba-page__box-head {
    flex-direction: column;
  }

  .ankaquba-page__item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ankaquba-page__item-actions {
    width: 100%;
    justify-content: space-between;
  }
}
