/* ====== MODAL ====== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-soft);
  border-radius: 20px;
  max-width: 900px;
  width: 94%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--accent2-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.modal-body {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (min-width: 720px) {
  .modal-body {
    flex-direction: row;
  }
}

.modal-image {
  flex: 1;
  min-width: 0;
  
}

.modal-image img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;aspect-ratio:1 / 1;
}

.modal-info {
  flex: 2;
  min-width: 0;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  color: #e5e7eb;
  cursor: pointer;
}

html[data-theme="light"] .modal-close {
  background: #e5e7eb;
  color: #020617;
}

.modal-close:hover {
  opacity: 0.9;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: var(--accent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  width: 100%;
}

.modal-footer {
  flex: 0 0 auto;
  padding: 0 1rem 1rem;
}

.modal-support-btn:hover {
  filter: brightness(1.05);
}

.modal-description {
  font-size: 0.9rem;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.modal-section h3 {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* ====== Capa Patreon previa al modal ====== */
.patreon-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patreon-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.patreon-gate__card {
  position: relative;
  z-index: 1;
  width: min(720px, 94vw);
  background: var(--bg-soft);
  border: 1px solid var(--accent2-soft);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.patreon-gate__heading {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

.patreon-gate__timer {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.patreon-gate__skip {
  align-self: flex-start;
  border: none;
  background: var(--accent2-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.patreon-gate__skip:hover {
  filter: brightness(1.05);
}

.patreon-gate__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.patreon-gate__help {
  color: var(--text);
  text-decoration: underline;
  font-weight: 500;
  font-size: small;
}

.patreon-gate__help:hover {
  opacity: 0.85;
}
