/* Agregar al calendario: modal con Apple, Google y Outlook (js/add-to-calendar.js) */

.atc-dialog {
  --atc-font: "Roboto Mono", monospace;
  --atc-heading-font: Montserrat, sans-serif;
  --atc-heading-weight: 900;
  --atc-heading-transform: uppercase;
  --atc-blue: var(--arqdis-blue, rgb(0, 0, 255));
  --atc-magenta: var(--arqdis-magenta, rgb(255, 0, 255));
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: var(--atc-font);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: auto;
}

.atc-dialog[open] {
  animation: atc-in 0.22s ease-out;
}

.atc-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

@keyframes atc-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.atc-dialog *,
.atc-dialog *::before,
.atc-dialog *::after {
  box-sizing: border-box;
}

.atc-panel {
  position: relative;
  padding: 28px 24px 24px;
}

.atc-dialog .atc-heading {
  margin: 0 40px 0 0;
  font-family: var(--atc-heading-font);
  font-weight: var(--atc-heading-weight);
  text-transform: var(--atc-heading-transform);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
  color: #000;
}

.atc-dialog .atc-event {
  margin: 10px 40px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #000;
  opacity: 0.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Día y hora del evento, antes de elegir el calendario */
.atc-dialog .atc-when {
  margin: 14px 40px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: #000;
}

.atc-dialog .atc-when span {
  display: block;
}

.atc-dialog .atc-when [hidden] {
  display: none;
}

.atc-dialog .atc-date {
  font-weight: 700;
}

/* Tres tarjetas cuadradas lado a lado, con la cuadrícula azul de los contenidos fijos */
.atc-dialog .atc-options {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
}

.atc-dialog .atc-options li {
  margin: 0;
  padding: 0;
}

.atc-dialog .atc-options li::before {
  content: none;
}

.atc-dialog .atc-options li[hidden] {
  display: none;
}

.atc-dialog a.atc-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 1 / 1;
  padding: 10px;
  border: 2px solid var(--atc-blue);
  background: #fff url("../assets/contenidos-fijos/patron-grid-cerrado-blue.png") 0 0 / 100px;
  color: #000;
  text-decoration: none;
  font-family: var(--atc-font);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  transition:
    border-color 0.3s,
    color 0.3s;
}

/* Hover solo en dispositivos con mouse: en pantallas táctiles el estado se quedaba "pegado" */
@media (hover: hover) {
  .atc-dialog a.atc-option:hover {
    border-color: var(--atc-magenta);
    color: var(--atc-blue);
  }

  .atc-dialog a.atc-option:hover .atc-logo {
    transform: translateY(-3px);
  }

  .atc-dialog .atc-close:hover img {
    transform: rotate(90deg);
  }
}

.atc-dialog a.atc-option:focus-visible {
  border-color: var(--atc-magenta);
  color: var(--atc-blue);
}

.atc-dialog a.atc-option {
  -webkit-tap-highlight-color: transparent;
}

.atc-dialog .atc-heading:focus {
  outline: none;
}

.atc-dialog a.atc-option:focus-visible {
  outline: 2px solid var(--atc-magenta);
  outline-offset: 2px;
}

/* Logos sin fondo (la cuadrícula se ve detrás); el nombre sí va sobre blanco para leerse bien */
.atc-dialog .atc-logo {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  object-fit: contain;
  background: none;
  transition: transform 0.3s;
}

.atc-dialog .atc-label {
  flex: 0 0 auto;
  padding: 2px 6px;
  background: #fff;
}

.atc-dialog .atc-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

.atc-dialog .atc-close img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

/* Celular: hoja desde abajo */
@media (max-width: 600px) {
  .atc-dialog {
    width: 100%;
    max-height: calc(100dvh - 48px);
    margin: auto 0 0;
  }

  .atc-dialog[open] {
    animation-name: atc-sheet-in;
  }

  .atc-panel {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .atc-dialog a.atc-option {
    font-size: 13px;
  }

  .atc-dialog .atc-logo {
    width: 40px;
    height: 40px;
  }

  @keyframes atc-sheet-in {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .atc-dialog[open] {
    animation: none;
  }
}

/* Páginas Conf ✴: usan Work Sans y no cargan Montserrat ni Roboto Mono */
.conf-page .atc-dialog {
  --atc-font: "Work Sans", sans-serif;
  --atc-heading-font: "Work Sans", sans-serif;
  --atc-heading-weight: 500;
  --atc-heading-transform: none;
}
