/* css/card.css - share-card preview modal (demo Task 3).
   The canvas itself is drawn in js/renderers/card.js; these styles only frame
   the preview overlay, scale the 1200x630 canvas to fit, and lay out the
   download / close actions. */

.afs-card-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.afs-card-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(2px);
}

.afs-card-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(96vw, 1040px);
  max-height: 92vh;
}

.afs-card-modal__canvas-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  line-height: 0; /* kill the inline-canvas descender gap */
}

.afs-card-canvas {
  display: block;
  width: 100%;
  height: auto;
  /* 1200x630 intrinsic; scaled down responsively, downloaded at full size */
}

.afs-card-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.afs-card-modal__btn {
  font: inherit;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1.5px solid rgba(245, 239, 225, 0.5);
  background: transparent;
  color: #f5efe1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.afs-card-modal__btn:hover {
  background: rgba(245, 239, 225, 0.12);
  border-color: rgba(245, 239, 225, 0.8);
}

.afs-card-modal__btn:active {
  transform: translateY(1px);
}

.afs-card-modal__btn--primary {
  background: #e9c26a;
  border-color: #e9c26a;
  color: #1a1410;
}

.afs-card-modal__btn--primary:hover {
  background: #f0cf85;
  border-color: #f0cf85;
}

.afs-card-modal__btn:focus-visible {
  outline: 3px solid #8ab4ff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .afs-card-modal__btn {
    transition: none;
  }
}
