/* ========================================================================== */
/*  MODALS                                                                    */
/*  Checkout, cart details, video, info, artwork details & order complete     */
/*  overlays for the Lorien Velmore storefront.                               */
/* ========================================================================== */


/* ==========================================================================
   CHECKOUT MODAL
   Large, centered overlay for collecting customer details.
   ========================================================================== */

/* Checkout overlay background (hidden by default) */
.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;                  /* toggled to flex via JS when opened */
  justify-content: center;
  align-items: center;
  z-index: 2200;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Checkout modal panel */
.checkout-modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-family: 'Playfair Display', serif;
  position: relative;
  box-sizing: border-box;
}

/* Checkout title */
.checkout-modal-content h2 {
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  font-weight: 100;
  color: #2c2c2c;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* Checkout form layout */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-height: calc(100% - 100px);
  overflow-y: auto;
}

/* Form fields */
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f8f8f8;
  transition: border-color 0.3s ease, background 0.3s ease;
  height: 60px;
  box-sizing: border-box;
}

.stripe-wrapper {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px;
}

#payment-element {
  width: 100%;
  min-height: 44px;
}

.checkout-form textarea {
  resize: none;
}

/* Focused field state */
.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
  border-color: #b89d5f;
  outline: none;
  background: #fff;
}

/* Primary checkout submit button */
.submit-checkout {
  background: #000;
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 100;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  max-width: 500px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.submit-checkout:hover {
  background: #1a1a1a;
  transform: translateY(-3px);
}

/* Close button (X) in the top-right corner */
.close-checkout {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-checkout:hover {
  color: #b89d5f;
}


/* ==========================================================================
   VIDEO MODAL
   Used to present an embedded video or HTML5 video player.
   ========================================================================== */

/* Video overlay */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Video modal panel */
.video-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 700px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

/* Video title */
.video-modal-content h2 {
  font-size: 2rem;
  color: #1c1c1c;
  margin-bottom: 10px;
}

/* For iframe-based players (e.g. Vimeo / YouTube-style layout) */
.video-iframe {
  width: 100%;
  height: 400px;
  border-radius: 8px;
}

/* Close button for video modal */
.close-video {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-video:hover {
  color: #b89d5f;
}

/* HTML5 video element styling */
.video-player {
  width: 100%;
  height: auto;
  border-radius: 8px;
  max-height: 400px;
  object-fit: cover;
}


/* ==========================================================================
   INFO MODAL
   Rich text information about the collection, concept or artist.
   ========================================================================== */

/* Info overlay */
.info-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Info modal panel */
.info-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  position: relative;
}

/* Info heading */
.info-modal-content h2 {
  font-family: 'Bodoni Moda', serif;
  font-size: 2rem;
  color: #1c1c1c;
  margin-bottom: 10px;
}

/* Info body text */
.info-modal-content p,
.info-modal-content ul {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #2c2c2c;
  line-height: 1.8;
}

/* Bullet list formatting */
.info-modal-content ul {
  list-style: disc;
  margin: 20px;
  padding-left: 40px;
  text-align: left;
}

/* Close button for info modal */
.close-info {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-info:hover {
  color: #b89d5f;
}


/* ==========================================================================
   ARTWORK DETAILS MODAL
   High-detail view showing enlarged artwork and its specifications.
   ========================================================================== */

/* Artwork overlay */
.artwork-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;                 /* toggled to flex via JS */
  justify-content: center;
  align-items: center;
  z-index: 2100;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Artwork modal panel */
.artwork-modal-content {
  background: #fff;
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 20px;
  font-family: 'Playfair Display', serif;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Two-column layout: image | details */
.artwork-modal-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items: flex-start;
  max-height: calc(92vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* Large artwork image inside modal */
.artwork-large {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
  object-fit: contain;
  max-height: calc(92vh - 120px);
  cursor: default;   /* no pointer to suggest zoom since modal is already detailed */
}

/* Close button (X) – mobile-friendly hit area */
.close-artwork {
  position: absolute;
  top: 8px;
  right: 8px;
  /* Make the touch target large enough for thumbs */
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  border: none;
  font-size: 1.4rem;
  color: #777;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 5;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
}

.close-artwork:hover {
  background: #f5f5f5;
  color: #b89d5f;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .close-artwork {
    top: 4px;
    right: 4px;
  }
}



/* ------------------------- Artwork details column -------------------------- */

.artwork-details h3 {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.65rem;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.artwork-details p {
  margin: 4px 0;
  color: #2c2c2c;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Story / description text */
.artwork-description {
  font-size: 1rem;
  line-height: 1.7;
  color: #2c2c2c;
  margin: 6px 0 10px;
  opacity: 0.9;
}

/* Highlighted price */
.artwork-details .artwork-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #b89d5f;
  margin: 6px 0 10px;
}

/* ----------------------- Included items (pill row) ------------------------- */

.artwork-included {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}

/* Generic pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f4f4;
  border: 1px solid #eee;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* NFT-focused pill */
.pill-nft {
  background: linear-gradient(90deg, #fff7d6, #fff);
  border-color: #e6c76d;
  color: #8c6c2a;
}

/* -------------------- Technical specs list (key/value) --------------------- */

.artwork-specs {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}

/* Default spec row */
.artwork-specs li {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #eee;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artwork-specs li:last-child {
  border-bottom: none;
}

.artwork-specs strong {
  font-weight: 700;
  color: #111;
}

/* Ritual / special spec row style */
.artwork-specs li.ritual {
  border: 1px solid #b89d5f;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
  background: #fffdf6;
  list-style: none;
  display: block;
  color: #3a2b12;
  font-weight: 500;
}

.artwork-specs li.ritual strong {
  color: #8c6c2a;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}


/* ==========================================================================
   ORDER COMPLETE MODAL
   Confirmation dialog shown after successful checkout.
   ========================================================================== */

/* Success overlay */
.order-complete-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 3000;
}

/* Confirmation panel */
.order-complete-content {
  background: #fff;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  position: relative;
}

/* Heading */
.order-complete-content h2 {
  text-transform: uppercase;
  font-weight: 100;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Lead line */
.oc-lead {
  margin: 6px 0;
  color: #1c1c1c;
  font-size: 1.1rem;
}

/* Sub copy */
.oc-sub {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

/* Action button to close / continue browsing */
.oc-done-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 100;
  text-transform: uppercase;
  cursor: pointer;
}

/* Close icon (X) */
.close-order-complete {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-order-complete:hover {
  color: #b89d5f;
}


/* ==========================================================================
   FRAME PREVIEW AROUND LARGE ARTWORK
   Decorative, toggleable frame simulation in artwork details modal.
   ========================================================================== */

/* Frame wrapper around the large artwork */
.artwork-modal .artwork-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  transition:
    box-shadow 0.25s ease,
    padding 0.25s ease,
    border-width 0.25s ease;

  /* Custom properties define mat / frame proportions and colors */
  --mat: 18px;
  --gap: 6px;
  --frame: 14px;
  --outline: 4px;
  --mat-color: #f8f7f3;
  --frame-color: #fdfdfc;
  --outline-color: #c2c2c2;
}

/* Active frame state */
.artwork-modal .artwork-image-wrap.frame-visible {
  background: var(--mat-color);
  padding: var(--mat);
  border: var(--frame) solid var(--frame-color);
  outline: var(--outline) solid var(--outline-color);
  border-radius: 1px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Frame size variants */
.artwork-modal .artwork-image-wrap.frame-m {
  --mat: 16px;
  --frame: 12px;
  --outline: 3px;
}

.artwork-modal .artwork-image-wrap.frame-l {
  --mat: 18px;
  --frame: 14px;
  --outline: 4px;
}

.artwork-modal .artwork-image-wrap.frame-xl {
  --mat: 20px;
  --frame: 16px;
  --outline: 5px;
}

/* Large image inside frame wrapper */
.artwork-modal .artwork-image-wrap > img.artwork-large {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 1px;
}

/* Frame eye toggle (icon button) */
.frame-eye {
  margin-left: 6px;
  inline-size: 20px;
  block-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: #666;
  opacity: 1;
}

.frame-eye.on {
  color: #000;
}

.frame-eye svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Shadow-based frame rendering */
.artwork-image-wrap.frame-visible::before,
.artwork-image-wrap.frame-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Inner mat shadow */
.artwork-image-wrap.frame-visible::before {
  box-shadow: inset 0 0 0 var(--mat) var(--mat-color);
}

/* Outer frame shadow & drop shadow */
.artwork-image-wrap.frame-visible::after {
  box-shadow:
    inset 0 0 0 calc(var(--mat) + var(--gap)) #fff,
    0 2px 10px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08);
}

/* 45° mitre corner effect */
.artwork-modal .artwork-image-wrap {
  --mitre: rgba(0, 0, 0, 0.14);
}

.artwork-modal .artwork-image-wrap.frame-visible::before {
  background:
    linear-gradient(45deg, var(--mitre) 0 1px, transparent 1px)
      top left / calc(var(--frame) + var(--outline)) calc(var(--frame) + var(--outline)) no-repeat,
    linear-gradient(-45deg, var(--mitre) 0 1px, transparent 1px)
      top right / calc(var(--frame) + var(--outline)) calc(var(--frame) + var(--outline)) no-repeat,
    linear-gradient(-135deg, var(--mitre) 0 1px, transparent 1px)
      bottom left / calc(var(--frame) + var(--outline)) calc(var(--frame) + var(--outline)) no-repeat,
    linear-gradient(135deg, var(--mitre) 0 1px, transparent 1px)
      bottom right / calc(var(--frame) + var(--outline)) calc(var(--frame) + var(--outline)) no-repeat;
}


/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   Focus on making artwork modal comfortable on small devices.
   ========================================================================== */

/* Mobile layout for artwork modal */
@media (max-width: 768px) {

  .artwork-modal {
    align-items: flex-start;
    padding: 72px 12px 16px;   /* keep clear of fixed header */
  }

  .artwork-modal-content {
    max-height: none;
    height: auto;
    padding: 16px 16px 24px;
  }

  /* Single column: image on top, text below */
  .artwork-modal-body {
    display: block;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .artwork-large {
    max-height: 50vh;
    margin-bottom: 16px;
  }

  .artwork-specs li {
    grid-template-columns: 1fr;
  }

  .artwork-description,
  .artwork-details p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Slightly softer radius on very small screens */
@media (max-width: 600px) {
  .artwork-modal-content {
    border-radius: 12px;
  }
}
