/* ==================================================================
   ASCENDANT GEMSTONES — fallback styles
   ------------------------------------------------------------------
   Loaded ONLY when the active theme has not declared:

       add_theme_support('ascendant-gemstones');

   The Ascendant Enterprise theme declares it, so this file never
   loads there. Its job is to make the plugin's components — cards,
   the selector, the modal, forms, the FAQ — presentable in a
   third-party theme without fighting that theme's own design.

   So it is deliberately restrained: it inherits the host theme's
   colours and typography wherever it can, and only supplies the
   structure the components genuinely need.
   ================================================================== */

.aeg-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------- Grid ---------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid > * { min-width: 0; }

.cluster { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.cluster--center { justify-content: center; }
.center { text-align: center; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; } .mt-7 { margin-top: 3rem; }
.mb-5 { margin-bottom: 1.5rem; } .mb-6 { margin-bottom: 2rem; }
.text-small { font-size: 0.875em; }
.text-muted { opacity: .75; }

/* ---------------- Cards ---------------- */
.card, .gem-card {
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 6px;
  overflow: hidden;
}
.card { padding: 1.5rem; }
.gem-card { display: flex; flex-direction: column; }
.gem-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; display: grid; place-items: stretch; }
.gem-card__media img, .gem-card__media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.gem-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.gem-card__planet {
  position: absolute; top: .75rem; right: .75rem; z-index: 2;
  padding: .25em .7em; border-radius: 100px; font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(0,0,0,.7); color: #E7D08A;
}
.gem-card__alt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.gem-card__text { font-size: .9rem; flex: 1; }
.gem-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding-top: 1rem; font-size: .875rem;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

/* ---------------- Selector ---------------- */
.selector {
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 8px; padding: 1.75rem; margin-top: 1.5rem;
}
.selector__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.field { margin-bottom: 1.75rem; }
.field__label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.field__value { font-size: 1.4rem; font-weight: 600; }

.segment {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 5px; padding: .35rem;
}
.segment__btn { padding: .8rem .35rem; border: 0; border-radius: 3px; background: none; cursor: pointer; text-align: center; }
.segment__btn[aria-pressed="true"] { background: #C9A227; color: #0B0E16; }
.segment__name { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.segment__sub { display: block; font-size: .7rem; margin-top: .25em; opacity: .75; }
.quality-note { margin-top: 1rem; font-size: .875rem; min-height: 4.5em; opacity: .8; }

.slider input[type="range"] { width: 100%; accent-color: #C9A227; }
.slider__ticks { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .7rem; opacity: .6; }

.estimate {
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 5px; padding: 1.25rem; margin-top: 1.5rem;
}
.estimate__k { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.estimate__v { font-size: 1.8rem; font-weight: 600; line-height: 1.1; margin-top: .35rem; }
.estimate__meta, .estimate__budget { font-size: .85rem; margin-top: .6rem; opacity: .8; }
.estimate__budget[data-fit="over"] { color: #C97B18; opacity: 1; }
.estimate__disclaimer { font-size: .75rem; line-height: 1.5; margin-top: 1rem; opacity: .65; }
.selector__actions { display: grid; gap: .75rem; margin-top: 1.5rem; }
@media (min-width: 520px) { .selector__actions { grid-template-columns: 1fr auto; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .9em 1.8em; border: 1px solid currentColor; border-radius: 4px;
  font-size: .875rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  background: none; text-align: center;
}
.btn--primary { background: #C9A227; border-color: #C9A227; color: #0B0E16; font-weight: 600; }
.btn--block { width: 100%; }
.btn--lg { padding: 1.05em 2.2em; }

/* ---------------- Forms ---------------- */
.fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
.fieldset > legend {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 0 0 .75rem; width: 100%; margin-bottom: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-grid .span-2 { grid-column: 1 / -1; }
.input-group { display: flex; flex-direction: column; gap: .4rem; }
.input-group .req { color: #C9A227; }
.input-group .hint { font-size: .75rem; opacity: .65; }
.input { width: 100%; padding: .8em 1em; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); border-radius: 4px; }
.input[aria-invalid="true"] { border-color: #C0392B; }
.field-error { font-size: .8rem; color: #C0392B; min-height: 1.2em; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-block; padding: .55em 1.1em; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); border-radius: 100px; font-size: .85rem; cursor: pointer; }
.pill input:checked + span { border-color: #C9A227; color: #C9A227; }
.file-drop { position: relative; border: 1px dashed color-mix(in srgb, currentColor 30%, transparent); border-radius: 4px; padding: 1.75rem; text-align: center; cursor: pointer; }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop__icon { margin: 0 auto .6rem; color: #C9A227; }
.file-drop__text { font-size: .85rem; opacity: .8; }
.file-drop__name { font-size: .85rem; color: #C9A227; margin-top: .4rem; }

/* ---------------- Summary + notices ---------------- */
.summary-card { border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: 5px; padding: 1.25rem; margin-bottom: 1.75rem; }
.summary-card__title { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1rem; opacity: .8; }
.summary-list { display: grid; gap: .6rem; font-size: .875rem; margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 1rem; }
.summary-list dt { opacity: .7; }
.summary-list dd { margin: 0; text-align: right; font-weight: 500; }

.notice {
  display: flex; gap: 1rem; padding: 1.15rem;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-left: 2px solid #C9A227; border-radius: 4px; font-size: .875rem;
}
.notice svg { flex: none; color: #C9A227; margin-top: .15em; }
.notice strong { display: block; margin-bottom: .25em; }
.notice--error { border-left-color: #C0392B; }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal__panel {
  position: relative; z-index: 1;
  width: min(100% - 1.5rem, 720px);
  max-height: calc(100dvh - 3rem);
  margin: 1.5rem auto; overflow-y: auto; overscroll-behavior: contain;
  background: Canvas; color: CanvasText;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.75rem 1.75rem 1.25rem; background: inherit;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.modal__sub { font-size: .875rem; margin-top: .5rem; opacity: .75; }
.modal__close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 4px; background: none; cursor: pointer; }
.modal__body { padding: 1.75rem; }
body.is-locked { overflow: hidden; }

/* ---------------- FAQ ---------------- */
.faq { border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.faq__item { border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; padding: 1.25rem 0; text-align: left;
  background: none; border: 0; cursor: pointer; font-size: 1.05rem; color: inherit;
}
.faq__icon { flex: none; width: 16px; height: 16px; position: relative; margin-top: .35em; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: #C9A227; transition: transform .25s ease, opacity .25s ease; }
.faq__icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq__icon::after { left: 50%; top: 0; height: 100%; width: 1.5px; transform: translateX(-50%); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq__a[data-open="true"] { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: 1.25rem; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
