/* Virtual Try-On modal — "virtual fitting room". Editorial black/white,
   uppercase micro-labels like the rest of the storefront. Logical
   properties throughout so the layout mirrors correctly in Arabic (RTL). */

.vto-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.vto-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
}

.vto-eyebrow,
.vto-step-label,
.vto-item-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b6459;
}

.vto-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
}

.vto-modal-body {
    padding: 0.5rem 1.5rem 1rem;
}

.vto-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Item being tried on */
.vto-item-frame {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f2ee;
    margin-block-end: 0.75rem;
}
.vto-item-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vto-item-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #111;
    line-height: 1.3;
    margin-block-start: 0.15rem;
}
.vto-item-brand {
    font-size: 0.8rem;
    color: #6b6459;
}

/* Credits */
.vto-credits-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    margin-block-end: 1.1rem;
    border-radius: 10px;
    background: #f7f5f1;
    font-size: 0.8rem;
    color: #4a463f;
}
.vto-credits-strip i { color: #b7791f; }
.vto-credits-strip a { color: #111; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.vto-step-label { margin-block-end: 0.5rem; }

/* Item type chips */
.vto-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-block-end: 1.25rem;
}
/* The garment type is decided by the product (vto/services/eligibility.py):
   shown as a fixed label, not a choice. */
.vto-chip {
    display: inline-block;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: #111;
    color: #fff;
}

/* Photo dropzone */
.vto-dropzone {
    display: block;
    cursor: pointer;
    border: 1.5px dashed #cfc9be;
    border-radius: 14px;
    background: #fbfaf8;
    transition: border-color 0.15s, background 0.15s;
    margin-block-end: 0.35rem;
    overflow: hidden;
}
.vto-dropzone:hover,
.vto-dropzone:focus-within { border-color: #111; background: #fff; }
.vto-dropzone.is-invalid { border-color: #c8102e; }
.vto-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.6rem 1rem;
    text-align: center;
}
.vto-dropzone-empty i { font-size: 1.4rem; color: #111; }
.vto-dropzone-title { font-weight: 600; font-size: 0.9rem; color: #111; }
.vto-dropzone-hint { font-size: 0.75rem; color: #6b6459; }
.vto-dropzone-filled {
    position: relative;
    display: block;
}
.vto-dropzone-filled img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    background: #f4f2ee;
}
.vto-dropzone-change {
    position: absolute;
    inset-block-end: 0.6rem;
    inset-inline-end: 0.6rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.82);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
#vto-photo-feedback.d-block { margin-block-end: 0.5rem; }

/* Consent */
.vto-consent {
    margin-block-start: 1rem;
    font-size: 0.76rem;
    color: #6b6459;
    line-height: 1.45;
}
.vto-consent .form-check-input:checked { background-color: #111; border-color: #111; }
.vto-consent a { color: #111; font-weight: 600; }

/* Loading */
.vto-loading {
    text-align: center;
    padding: 1rem 0 0.5rem;
}
.vto-loading-visual {
    position: relative;
    width: 180px;
    aspect-ratio: 3 / 4;
    margin: 0 auto 1rem;
    border-radius: 14px;
    overflow: hidden;
    background: #f4f2ee;
}
.vto-loading-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.35) blur(1px);
    opacity: 0.8;
}
.vto-loading-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
    background-size: 220% 100%;
    animation: vto-shimmer 1.6s ease-in-out infinite;
}
@keyframes vto-shimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}
.vto-loading-title { font-weight: 700; font-size: 1rem; color: #111; letter-spacing: 0.02em; }
.vto-loading-sub { font-size: 0.8rem; color: #6b6459; }
.vto-loading-link { display: inline-block; margin-top: .6rem; color: #111; font-weight: 600; text-decoration: underline; }

/* Result */
.vto-result img#vto-result-image {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    border-radius: 14px;
    background: #f4f2ee;
}
.vto-result-actions {
    display: flex;
    gap: 0.5rem;
    margin-block-start: 0.85rem;
}
.vto-result-actions .btn { flex: 1; border-radius: 999px; font-weight: 600; }

.vto-error { border-radius: 12px; font-size: 0.85rem; }

/* Footer */
.vto-modal-footer {
    padding: 0.9rem 1.5rem 1.4rem;
    border-top: 1px solid #f0ede7;
}
.vto-generate,
.vto-generate:hover,
.vto-generate:focus {
    background: #111;
    border-color: #111;
}
.vto-generate {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.vto-generate:disabled { background: #b9b5ad; border-color: #b9b5ad; opacity: 1; }

/* Phones: full-screen sheet, item collapses to a compact row */
@media (max-width: 575.98px) {
    .vto-modal .modal-content { border-radius: 0; }
    .vto-layout { grid-template-columns: 1fr; gap: 1rem; }
    .vto-item { display: grid; grid-template-columns: 64px 1fr; column-gap: 0.75rem; align-items: center; }
    .vto-item-frame { grid-row: span 3; margin: 0; width: 64px; }
    .vto-modal-footer { position: sticky; bottom: 0; background: #fff; }
}

/* Stacking: the modal carries .zn-modal-raised (base_common.css) so it and
   its backdrop sit above the sticky header and Nour's chat button. */

/* "Try It On" launcher on the product image — a solid gold pill with ink
   text (product photos are mostly light, so a translucent one disappears
   into them, and gold sets it apart from the black/white shopping buttons).
   Ink on #c9a24b is about 8:1 contrast. */
.vto-launch {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  margin: 0.75rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1.1rem 0.35rem 0.35rem;
  border: 0;
  border-radius: 999px;
  background: #c9a24b;
  color: #111;
  box-shadow: 0 8px 22px rgba(120, 90, 20, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
[dir="rtl"] .vto-launch { padding: 0.35rem 0.35rem 0.35rem 1.1rem; }
.vto-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #111;
  color: #e3c675;
}
.vto-launch-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.vto-launch-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.7);
}
.vto-launch-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vto-launch:hover,
.vto-launch:focus-visible {
  background: #b8902f;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(120, 90, 20, 0.45);
}
.vto-launch:focus-visible { outline: 2px solid #111; outline-offset: -4px; }
@media (max-width: 575.98px) {
  .vto-launch { margin: 0.5rem; gap: 0.45rem; }
  .vto-launch-icon { width: 1.75rem; height: 1.75rem; }
  .vto-launch-label { font-size: 0.74rem; }
}
