/* =========================================================================
   Muheeb · Sadu design system — utilities
   Black (#0A0A0A) on cream (#F5F1EA) cultural accents.
   Pulled from Sadu Placement Options.html / sadu.jsx
   ========================================================================= */

:root {
  --sadu-ink: #0A0A0A;
  --sadu-cream: #F5F1EA;
  --sadu-hairline: rgba(10,10,10,0.12);
}

/* ─── 01 · TOP + BOTTOM STRIPS ────────────────────────────────────────── */
/* Removed per request — diamond/card/button/loader/success utilities below
   stay active. */

/* ─── 02 · STEP INDICATOR · DIAMONDS ──────────────────────────────────── */

.sadu-steps {
  display: flex;
  align-items: center;
  direction: rtl;
  width: 100%;
  gap: 0;
}

.sadu-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.sadu-step-diamond {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.sadu-step-label {
  font-family: 'YearOfTheCamel','Cairo',sans-serif;
  font-size: 10px;
  color: #9A958C;
  font-weight: 400;
  white-space: nowrap;
}

.sadu-step.active .sadu-step-label,
.sadu-step.completed .sadu-step-label {
  color: var(--sadu-ink);
  font-weight: 600;
}

/* Fill the diamond when active/completed (works on inline-SVG polygons) */
.sadu-step.active .sadu-step-diamond polygon,
.sadu-step.completed .sadu-step-diamond polygon {
  fill: var(--sadu-ink);
}

.sadu-step-line {
  flex: 1;
  height: 1px;
  background: rgba(10,10,10,0.18);
  margin-bottom: 18px;
  min-width: 14px;
}

.sadu-step-line.filled {
  background: var(--sadu-ink);
}

/* ─── 03 · CARD CORNER ACCENTS ────────────────────────────────────────── */
/* Applied subtly to top-right and bottom-left of selection cards.         */

.fabric-card,
.color-card,
.collar-card,
.body-shape-card,
.fit-card,
.aimeasure-results-card {
  position: relative;
}

.fabric-card::before,
.color-card::before,
.collar-card::before,
.body-shape-card::before,
.fit-card::before,
.aimeasure-results-card::before,
.fabric-card::after,
.color-card::after,
.collar-card::after,
.body-shape-card::after,
.fit-card::after,
.aimeasure-results-card::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: 0.55;
}

/* Top-right bracket (a = top, c = horizontal, default mark facing top-left;
   we flip it for top-right anchor) */
.fabric-card::before,
.color-card::before,
.collar-card::before,
.body-shape-card::before,
.fit-card::before,
.aimeasure-results-card::before {
  top: 6px;
  right: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><line x1='13' y1='1' x2='6.3' y2='1' stroke='%230A0A0A' stroke-width='0.9'/><line x1='13' y1='1' x2='13' y2='7.7' stroke='%230A0A0A' stroke-width='0.9'/><polygon points='13,10.92 10.52,8.68 10.52,13.16' fill='%230A0A0A'/></svg>");
}

/* Bottom-left bracket (mirror of top-right) */
.fabric-card::after,
.color-card::after,
.collar-card::after,
.body-shape-card::after,
.fit-card::after,
.aimeasure-results-card::after {
  bottom: 6px;
  left: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><line x1='1' y1='13' x2='7.7' y2='13' stroke='%230A0A0A' stroke-width='0.9'/><line x1='1' y1='13' x2='1' y2='6.3' stroke='%230A0A0A' stroke-width='0.9'/><polygon points='1,3.08 3.48,5.32 3.48,0.84' fill='%230A0A0A'/></svg>");
}

/* ─── 04 · BUTTONS · DIAMOND ACCENT + OUTLINE VARIANT ─────────────────── */

/* Add small diamond accent next to label on primary buttons.
   In RTL with flex, ::after appears visually on the LEFT (matching design). */
.btn-next:not(.sadu-no-accent)::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-inline-start: 8px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><polygon points='5,0.5 9.5,5 5,9.5 0.5,5' fill='%23F5F1EA'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

.btn-next {
  background: var(--sadu-ink) !important;
  color: var(--sadu-cream) !important;
  border-radius: 4px !important;
}

/* Outline variant — applied to .sadu-btn-outline (or any button with this class) */
.sadu-btn-outline {
  width: 100%;
  height: 52px;
  background: transparent;
  color: var(--sadu-ink);
  border: 1px solid var(--sadu-ink);
  border-radius: 4px;
  cursor: pointer;
  font-family: 'YearOfTheCamel','Cairo',sans-serif;
  font-weight: 600;
  font-size: 15px;
  direction: rtl;
}

/* ─── 05 · LOADING · ROTATING DIAMOND ─────────────────────────────────── */

@keyframes saduSpin { to { transform: rotate(360deg); } }
@keyframes saduFade { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }

.sadu-loader-diamond {
  width: 120px;
  height: 120px;
  position: relative;
}
.sadu-loader-diamond .center { animation: saduSpin 4s linear infinite; transform-origin: 50px 50px; }
.sadu-loader-diamond .sat    { animation: saduFade 1.6s ease-in-out infinite; transform-origin: 50px 50px; }

/* ─── 06 · SUCCESS MARK · NESTED DIAMONDS ─────────────────────────────── */

@keyframes saduSuccessIn {
  0%   { transform: scale(0.4) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.06) rotate(2deg);  opacity: 1; }
  100% { transform: scale(1)    rotate(0);     opacity: 1; }
}
@keyframes saduRayIn {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}

.sadu-success { display: inline-block; line-height: 0; }
.sadu-success .core { animation: saduSuccessIn 0.7s cubic-bezier(.2,.8,.2,1) both; transform-origin: 50px 50px; transform-box: fill-box; }
.sadu-success .ray  { animation: saduRayIn 0.5s ease-out both; transform-origin: 50px 50px; transform-box: fill-box; }
