/* === Samples: tokens === */
:root {
  --samples-z-fab: 70;
  --samples-z-trey: 80;
  --samples-z-modal: 110;
  --samples-bg: rgba(255,255,255,0.85);
  --samples-border: 1px solid rgba(0,0,0,0.06);
  --samples-radius: 12px;
  --samples-accent: var(--accent-red, #C8102E);
  --samples-field-bg: #f5f5f7;
}

/* === Trey (desktop) === */
.iden-trey {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 120%);
  width: calc(100% - 32px);
  max-width: 1200px;
  height: 72px;
  padding: 0 16px 0 12px;
  background: var(--samples-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: var(--samples-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: var(--samples-z-trey);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@supports not (backdrop-filter: blur(20px)) {
  .iden-trey { background: rgba(255,255,255,0.95); }
}
.iden-trey.is-open { transform: translate(-50%, 0); }
.iden-trey.is-hidden { display: none; }

.iden-trey__stack { display: flex; align-items: center; padding: 8px 8px 8px 6px; }
.iden-trey__avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 12px;
  background-size: cover; background-position: center;
  margin-left: -10px;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 160ms;
}
.iden-trey__avatar:first-child { margin-left: 0; }
.iden-trey__avatar:hover { transform: translateY(-2px); z-index: 1; }
.iden-trey__avatar-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  padding: 0;
  background: var(--samples-accent);
  color: #fff;
  border-radius: 50%;
  border: 2px solid #fff;
  font: 700 14px/1 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 160ms, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.iden-trey__avatar:hover .iden-trey__avatar-remove { opacity: 1; transform: scale(1); }
@media (hover: none) {
  .iden-trey__avatar-remove { opacity: 1; transform: scale(1); }
}

.iden-trey__count { flex: 1; font: 500 15px/1 'Inter', sans-serif; color: var(--text, #111); letter-spacing: -0.01em; }
.iden-trey__cta {
  border: none;
  background: var(--samples-accent);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  font: 600 14px/1 'Inter', sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms, box-shadow 200ms;
}
.iden-trey__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(200,16,46,0.28); }
.iden-trey__cta:active { transform: translateY(0); }

body.iden-trey-open { padding-bottom: 96px; }
body.iden-trey-open .fab-main { transform: translateY(-80px); transition: transform 300ms ease; }

/* === Trey (mobile pill) === */
@media (max-width: 768px) {
  .iden-trey {
    left: 50%;
    bottom: 12px;
    width: auto;
    max-width: calc(100% - 32px);
    height: 52px;
    padding: 0 6px 0 20px;
    border-radius: 999px;
    gap: 12px;
  }
  .iden-trey__stack { display: none; }
  .iden-trey__count { flex: 0 0 auto; font-size: 14px; }
  .iden-trey__cta { padding: 12px 18px; font-size: 13px; }
  body.iden-trey-open { padding-bottom: 80px; }
}

/* === Geosuggest === */
.iden-suggest { position: relative; }
.iden-suggest__list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  z-index: 1;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  display: none;
}
.iden-suggest__list.is-open { display: block; }
.iden-suggest__item {
  padding: 10px 12px;
  border-radius: 8px;
  font: 400 14px/1.4 'Inter', sans-serif;
  cursor: pointer;
  transition: background 120ms;
}
.iden-suggest__item:hover,
.iden-suggest__item.is-active { background: var(--samples-field-bg); }
.iden-suggest__title { color: var(--text, #111); }
.iden-suggest__subtitle { color: var(--text-tertiary, #888); font-size: 12px; margin-top: 2px; }

/* === Modal === */
.iden-modal__overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  z-index: var(--samples-z-modal);
  transition: opacity 200ms ease;
  pointer-events: none;
}
.iden-modal__overlay.is-open { opacity: 1; pointer-events: auto; }

.iden-modal__sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px; max-width: 100%;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: calc(var(--samples-z-modal) + 1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.iden-modal__sheet.is-open { transform: translateX(0); }

.iden-modal__handle { display: none; }
.iden-modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border: none; background: transparent;
  cursor: pointer; font-size: 20px; color: var(--text-tertiary);
  z-index: 2;
}
.iden-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 48px 32px 32px;
  -webkit-overflow-scrolling: touch;
}
.iden-modal__title {
  font: 600 28px/1.1 'Inter', sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.iden-modal__sub {
  font: 400 14px/1.4 'Inter', sans-serif;
  color: var(--text-tertiary, #888);
  margin: 0 0 20px;
}
.iden-modal__preview-stack { display: flex; margin-bottom: 12px; padding-top: 6px; padding-right: 6px; }
.iden-modal__preview {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 12px;
  background-size: cover; background-position: center;
  margin-left: -8px;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 160ms;
}
.iden-modal__preview:first-child { margin-left: 0; }
.iden-modal__preview:hover { transform: translateY(-2px); z-index: 1; }
.iden-modal__preview-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  padding: 0;
  background: var(--samples-accent);
  color: #fff;
  border-radius: 50%;
  border: 2px solid #fff;
  font: 700 14px/1 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.iden-modal__preview-remove:hover { transform: scale(1.1); }
.iden-modal__edit-link {
  display: inline-block;
  font: 400 13px/1 'Inter', sans-serif;
  color: var(--text-tertiary);
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 24px;
}

/* fields */
.iden-field { display: block; margin-bottom: 16px; }
.iden-field__label {
  display: block;
  font: 500 12px/1 'Inter', sans-serif;
  letter-spacing: 0.02em;
  color: var(--text-tertiary, #888);
  text-transform: none;
  margin-bottom: 6px;
}
.iden-field__label-note { font-weight: 400; color: #b0b0b0; }
.iden-field__input,
.iden-field__textarea,
.iden-field__select {
  width: 100%;
  padding: 14px 14px;
  background: var(--samples-field-bg);
  border: 1px solid transparent;
  border-radius: 12px;
  font: 400 15px/1.2 'Inter', sans-serif;
  color: var(--text, #111);
  transition: border-color 160ms, box-shadow 160ms;
  -webkit-appearance: none;
  appearance: none;
}
.iden-field__input:focus,
.iden-field__textarea:focus,
.iden-field__select:focus {
  outline: none;
  border-color: var(--samples-accent);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.iden-field__textarea { min-height: 80px; resize: vertical; }
.iden-field__error {
  font: 400 12px/1.3 'Inter', sans-serif;
  color: var(--samples-accent);
  margin-top: 4px;
  display: none;
}
.iden-field.has-error .iden-field__input,
.iden-field.has-error .iden-field__select { border-color: var(--samples-accent); }
.iden-field.has-error .iden-field__error { display: block; }

.iden-check {
  display: flex; gap: 8px; align-items: flex-start;
  font: 400 13px/1.4 'Inter', sans-serif;
  color: var(--text-secondary, #555);
  margin: 4px 0 16px;
  cursor: pointer;
}
.iden-check input { margin-top: 2px; }

.iden-modal__note {
  font: 400 12px/1.4 'Inter', sans-serif;
  color: var(--text-tertiary);
  margin: 4px 0 16px;
  padding: 12px 14px;
  background: var(--samples-field-bg);
  border-radius: 10px;
}
.iden-btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  background: var(--samples-accent);
  color: #fff;
  font: 600 15px/1 'Inter', sans-serif;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 160ms;
}
.iden-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.iden-btn-primary:not(:disabled):hover { transform: translateY(-1px); }

.iden-modal__fineprint {
  font: 400 11px/1.4 'Inter', sans-serif;
  color: var(--text-tertiary);
  text-align: center;
  margin: 10px 0 0;
}
.iden-modal__fineprint a { color: inherit; text-decoration: underline; }

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .iden-trey,
  .iden-modal__sheet,
  .iden-modal__overlay,
  .iden-success,
  .iden-success__check path,
  .decor-sample-cta__btn {
    transition: opacity 150ms ease !important;
    animation: none !important;
    transform: none !important;
  }
  .iden-trey.is-open,
  .iden-modal__sheet.is-open { transform: none !important; opacity: 1; }
  .iden-success__check path { stroke-dashoffset: 0 !important; }
}

/* error banner inside modal */
.iden-modal__error-banner {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(200,16,46,0.08);
  color: var(--samples-accent);
  font: 400 13px/1.4 'Inter', sans-serif;
  margin-bottom: 12px;
  display: none;
}
.iden-modal__error-banner.is-open { display: block; }

/* mobile full-screen sheet */
@media (max-width: 768px) {
  .iden-modal__sheet {
    top: 0; left: 0; right: 0;
    width: 100%;
    height: 100dvh;
    transform: translateY(100%);
  }
  .iden-modal__sheet.is-open { transform: translateY(0); }
  .iden-modal__handle {
    display: block;
    width: 36px; height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
    margin: 8px auto;
    flex-shrink: 0;
  }
  .iden-modal__body { padding: 16px 20px 24px; }
}

.iden-success {
  text-align: center;
  padding: 12px 0 0;
  animation: iden-fade-in 400ms ease;
}
@keyframes iden-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.iden-success__check {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
}
.iden-success__check circle { fill: rgba(200,16,46,0.08); }
.iden-success__check path {
  fill: none;
  stroke: var(--samples-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  animation: iden-check 500ms cubic-bezier(0.65, 0, 0.45, 1) 120ms forwards;
}
@keyframes iden-check { to { stroke-dashoffset: 0; } }

.iden-success__title { font: 600 24px/1.2 'Inter', sans-serif; margin: 0 0 18px; letter-spacing: -0.01em; }
.iden-success__count { font: 400 14px/1.4 'Inter', sans-serif; color: var(--text-tertiary); margin: 0 0 8px; }
.iden-success__stack { display: flex; justify-content: center; margin: 0 0 20px; }
.iden-success__preview {
  width: 56px; height: 56px;
  border-radius: 12px;
  background-size: cover; background-position: center;
  margin-left: -8px;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.06);
}
.iden-success__preview:first-child { margin-left: 0; }
.iden-success__terms {
  font: 400 13px/1.5 'Inter', sans-serif;
  color: var(--text-secondary, #555);
  margin: 0 0 24px;
}
.iden-success__warn {
  font: 400 12px/1.4 'Inter', sans-serif;
  color: var(--text-tertiary);
  padding: 10px 12px;
  background: rgba(255,200,0,0.08);
  border-radius: 10px;
  margin: 0 0 16px;
}
.iden-btn-ghost {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  color: var(--text, #111);
  font: 500 14px/1 'Inter', sans-serif;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
}
.iden-success__order-id {
  font: 400 11px/1 'Inter', sans-serif;
  color: var(--text-tertiary);
  margin-top: 20px;
  letter-spacing: 0.04em;
}

/* === Decor CTA block === */
.decor-sample-cta {
  max-width: 880px;
  margin: 72px auto;
  padding: 0 24px;
}
.decor-sample-cta__card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 24px 48px -24px rgba(0,0,0,0.12);
  transition: transform 260ms var(--ease-out, ease), box-shadow 260ms var(--ease-out, ease);
}
.decor-sample-cta__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 32px 64px -24px rgba(0,0,0,0.18);
}
.decor-sample-cta__eyebrow {
  display: inline-block;
  font: 500 11px/1 'Inter', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary, #888);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.045);
  margin: 0 0 22px;
}
.decor-sample-cta h2 {
  font: 500 28px/1.2 'Inter', sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.decor-sample-cta p {
  font: 400 16px/1.65 'Inter', sans-serif;
  color: var(--text-secondary, #555);
  max-width: 500px;
  margin: 0 auto 32px;
}
.decor-sample-cta__btn {
  border: none;
  background: #1d1d1f;
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font: 500 15px/1 'Inter', sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: background 200ms, transform 160ms, box-shadow 220ms;
}
.decor-sample-cta__btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.decor-sample-cta__btn.is-added {
  background: var(--samples-accent);
  color: #fff;
}
.decor-sample-cta__btn.is-locked { opacity: 0.45; cursor: not-allowed; }
.decor-sample-cta__note {
  font: 400 10px/1.4 'Inter', sans-serif !important;
  letter-spacing: 0.04em;
  color: #a1a1a6 !important;
  text-align: center !important;
  max-width: none !important;
  margin: 20px auto 0 !important;
}
@keyframes iden-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.decor-sample-cta__btn.is-shaking { animation: iden-shake 300ms; }

@media (max-width: 640px) {
  .decor-sample-cta { margin: 56px auto; }
  .decor-sample-cta__card { padding: 40px 24px; border-radius: 20px; }
  .decor-sample-cta h2 { font: 500 22px/1.2 'Inter', sans-serif; }
  .decor-sample-cta p { font-size: 15px; }
}
