/* =========================================================================
   ESTILOS DE LUJO MINIMALISTA CIELO MODALS
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --modal-font-serif: "Cormorant Garamond", Georgia, serif;
}

.cielo-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 10, 13, 0.7);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cielo-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.cielo-modal-window {
  position: relative;
  background: #fbfbf9;
  border: 1px solid var(--border, rgba(28, 28, 27, 0.12));
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 4px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  margin: auto;
}

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

/* BOTÓN DE CIERRE */
.cielo-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border, rgba(28, 28, 27, 0.15));
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground, #1c1c1b);
  z-index: 20;
  transition: all 0.25s ease;
}

.cielo-modal-close:hover {
  background: #1c1c1b;
  color: #fff;
  transform: rotate(90deg);
}

/* GRID DE 2 COLUMNAS */
.cielo-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 480px;
}

@media (min-width: 768px) {
  .cielo-modal-grid {
    grid-template-columns: 5fr 6fr;
  }
}

/* COLUMNA IMAGEN */
.cielo-modal-img-col {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  background: #f2f1ec;
}

.cielo-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cielo-modal-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 10, 13, 0.1) 0%, rgba(9, 10, 13, 0.4) 100%);
}

/* COLUMNA FORMULARIO */
.cielo-modal-content-col {
  padding: 3rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.cielo-modal-body-wrap {
  width: 100%;
}

.cielo-modal-heading {
  font-family: var(--modal-font-serif, "Cormorant Garamond", Georgia, serif) !important;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
  color: var(--foreground, #1c1c1b);
}

.cielo-modal-desc {
  font-family: var(--modal-font-serif, "Cormorant Garamond", Georgia, serif) !important;
  font-size: 1.15rem;
  color: var(--muted, rgba(28, 28, 27, 0.75));
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* CAMPOS */
.cielo-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cielo-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cielo-input-group label {
  font-family: var(--font-sans, sans-serif);
  font-size: 0.65rem !important;
  color: var(--muted, rgba(28, 28, 27, 0.65));
}

.cielo-modal-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border, rgba(28, 28, 27, 0.2));
  padding: 0.5rem 0;
  font-family: var(--modal-font-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 1.05rem;
  color: var(--foreground, #1c1c1b);
  outline: none;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.cielo-modal-input::placeholder {
  font-family: var(--modal-font-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 1rem;
  color: rgba(28, 28, 27, 0.4);
}

.cielo-modal-input:focus {
  border-color: #8a6a2e;
}

button.cielo-modal-submit,
.cielo-modal-submit {
  margin-top: 1rem;
  cursor: pointer;
  padding: 1rem 1.75rem;
  background-color: #090a0d !important;
  color: #ffffff !important;
  border: 1px solid #090a0d !important;
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-sans, sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background-color 0.3s ease;
}

button.cielo-modal-submit span,
.cielo-modal-submit span {
  color: #ffffff !important;
  display: inline-block;
  transition: color 0.2s ease;
}

button.cielo-modal-submit:hover,
.cielo-modal-submit:hover {
  background-color: #0d121c !important;
  border-color: #0d121c !important;
  color: #ffffff !important;
  opacity: 1;
  transform: scale(1.03); /* Zoom suave sin alterar el color claro del texto */
  box-shadow: 0 8px 24px rgba(9, 10, 13, 0.35);
}

button.cielo-modal-submit:hover span,
.cielo-modal-submit:hover span {
  color: #ffffff !important;
}

.cielo-modal-status {
  font-size: 0.75rem;
  margin-top: 0.75rem;
  text-align: center;
  min-height: 1.2rem;
}

@media (max-width: 640px) {
  .cielo-modal-backdrop {
    align-items: flex-start;
    padding: 2.5rem 0.85rem 3.5rem;
    display: block; /* Asegura scroll natural vertical completo en móviles */
  }

  .cielo-modal-window {
    max-height: none;
    margin: 0 auto;
    overflow: visible;
  }

  .cielo-modal-content-col {
    padding: 1.75rem 1.25rem 2rem;
  }

  .cielo-modal-img-col {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
  }

  .cielo-modal-heading {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  .cielo-modal-desc {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .cielo-modal-form {
    gap: 0.75rem;
  }

  .cielo-modal-submit {
    margin-top: 0.75rem;
    padding: 0.85rem 1.25rem;
  }
}
