/* ==========================================================================
   09-MODALS.CSS — ACCESSIBLE GLASS MODALS & LEAD CAPTURE
   Lead Systems Architect Specification — Zero Magic Numbers.
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-expo);
}

.modal-backdrop:not(.active) {
  display: none !important;
}

.modal-backdrop.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-2xl);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--glass-border-hover);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--duration-normal) var(--ease-expo);
  position: relative;
}

.modal-backdrop.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-expo);
}

.modal-close-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Contenido Interno del Modal de Rosas */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: start;
}

.modal-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 340px;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal-details {
  display: flex;
  flex-direction: column;
}

.modal-header-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  color: var(--mitabela-rose);
  margin-bottom: var(--space-2xs);
}

.modal-rose-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-main);
  margin-bottom: var(--space-sm);
}

.modal-rose-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.modal-specs-table {
  width: 100%;
  margin-bottom: var(--space-xl);
  font-size: var(--fs-sm);
}

.modal-specs-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--glass-border);
}

.modal-specs-row span:first-child {
  color: var(--text-muted);
}

.modal-specs-row span:last-child {
  color: var(--text-main);
  font-weight: var(--fw-semibold);
}

/* ==================== FORMULARIO DE CONTACTO / LEADS ==================== */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  background: var(--bg-surface-glass);
  padding: var(--space-2xl);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: var(--fs-base);
  transition: all var(--duration-fast) var(--ease-expo);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--advisory-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--mitabela-emerald);
  color: var(--mitabela-emerald);
}

.form-status.error {
  display: block;
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid var(--mitabela-crimson);
  color: var(--mitabela-rose);
}

/* ==========================================================================
   ROSE VARIETY IMAGE LIGHTBOX MODAL (HIGH-RES PREVIEW)
   ========================================================================== */
.lightbox-backdrop {
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.lightbox-modal-container {
  max-width: 880px !important;
  padding: var(--space-xl) !important;
  background: var(--bg-surface-glass) !important;
  border: 1px solid var(--glass-border-hover) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8) !important;
  border-radius: var(--radius-2xl) !important;
  overflow-y: auto !important;
}

.lightbox-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.lightbox-img-frame {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}


.lightbox-caption-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.lightbox-badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lightbox-tone-chip {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-main);
  margin: 0;
}

.lightbox-specs-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-xl);
  margin: var(--space-sm) 0;
  padding: var(--space-lg) 0;
  border-block: 1px solid var(--glass-border);
}

.lightbox-specs-summary > div { min-width: 0; }
.lightbox-specs-summary > div:nth-child(3),
.lightbox-specs-summary > div:last-child { grid-column: 1 / -1; }
.lightbox-specs-summary dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-2xs);
}
.lightbox-specs-summary dd {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.lightbox-specs-summary > div:first-child dd { color: var(--advisory-gold); }
.lightbox-photo-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  line-height: var(--lh-relaxed);
}
.lightbox-badge-row { flex-wrap: wrap; }
.lightbox-badge-row .rose-badge-tag { position: static; }
.lightbox-caption-box { gap: var(--space-md); }

.lightbox-desc-text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
}

.lightbox-btn-row {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .lightbox-img-frame {
    height: 300px;
  }
  .lightbox-modal-container {
    padding: var(--space-lg) !important;
    max-width: 95% !important;
  }
}
