:root {
  --color-primary: #000402;
  --color-secondary: #907030;
  --color-tertiary: #fff;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #333333;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f5f5;
}

.section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: min(calc(100% - 2.5rem), 75rem);
  margin: 1.5rem auto;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.section__title {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 2rem 1.25rem;
  flex-grow: 1;
  flex-basis: 200px;
}

.logo-header {
  width: min(100%, 200px);
}

.section__h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin: 0 0 0.5rem;
  line-height: 1.2;
  text-wrap: balance;
}

.section__p {
  margin: 0;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.section__formulario {
  padding: 2rem min(2.5rem, 10%);
  flex-grow: 3;
  flex-basis: 800px;
}

.formulario__h2 {
  color: var(--color-secondary);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 1rem;
  text-decoration: underline;
}

.formulario {
  & label {
    display: block;
    margin: 0.5rem 0 1.25rem;
    font-weight: 600;
    font-size: 14px;
  }

  & .accent {
    color: red;
  }

  & input,
  & select {
    width: 100%;
    padding: 0.5rem;
    margin: 0.25rem 0 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }

  & .formulario__hidden {
    display: none;

    &.active {
      display: block;
    }
  }
}

.formulario__buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#agencies-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#agencies-container .add-agency {
  width: 100%;
  padding: 0.5rem;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.formulario__div {
  margin-bottom: 2rem;
}

.formulario__disclamer {
  font-size: 0.75rem;
  color: #666;
}

.formulario__agencies {
  border: 1px solid var(--color-secondary);
  padding: 1.2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.formulario__button {
  background-color: transparent;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;

  &:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
  }

  &.formulario__button--square {
    display: none;
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;

    &.active {
      display: flex;
    }
  }
}

.formulario__p {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.5;
  text-wrap: pretty;
}

.formulario__alert {
  display: none;
  padding: 1.5rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: 4px;

  &[data-alert="success"] {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }

  &[data-alert="error"] {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
}

.alert__content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert__p {
  margin: 0;
}

.datos-evento {
  margin-left: 1rem;
}

.datos-evento__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.2rem 0 0.7rem;
  text-decoration: underline;
}

.datos-evento__item {
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  line-height: 1.5;
  text-wrap: pretty;

  & a {
    color: inherit;
  }
}

.formulario__checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;

  & input {
    display: inline-block;
    width: auto;
    margin-top: 0;
  }
}

.gracias-container {
  background: #fff;
  border-radius: 10px;
  padding: 30px min(40px, 10%);
  max-width: 600px;
  margin: 30px auto;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gracias-header {
  text-align: center;
  margin-bottom: 40px;
}

.gracias-header .material-symbols-outlined {
  font-size: 80px;
  color: #4caf50;
  margin-bottom: 20px;
}

.gracias-header h1 {
  font-size: 32px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 700;
}

.gracias-header p {
  font-size: 16px;
  color: #666;
  margin-bottom: 5px;
}

.datos-jurado {
  background-color: #f9f9f9;
  border-left: 4px solid var(--color-secondary);
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 4px;
}

.datos-jurado h3 {
  color: #333;
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
}

.dato-item {
  display: flex;
  margin-bottom: 12px;
  font-size: 14px;
}

.dato-label {
  font-weight: 600;
  color: #333;
  min-width: 120px;
}

.dato-valor {
  color: #666;
}

.grupo-evento {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.grupo-evento h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 700;
}

.grupo-evento-descripcion {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
  opacity: 0.95;
}

.evento-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.evento-detail-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.evento-detail-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  & span {
    font-size: 15px;
  }
}

.evento-detail-value {
  font-size: 18px;
  font-weight: 600;
}

.evento-ubicacion {
  grid-column: 1 / -1;
}

.evento-ubicacion .evento-detail-value {
  font-size: 16px;
}

.acciones {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.footer-note {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.gracias-decline-container {
  background: #fff;
  border-radius: 10px;
  padding: 60px 40px;
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gracias-header {
  margin-bottom: 40px;
}

.gracias-header .material-symbols-outlined {
  font-size: 80px;
  color: #907030;
  margin-bottom: 20px;
  display: block;
}

.gracias-header h1 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  color: var(--color-text);
  margin: 20px 0 0;
}

.gracias-header p {
  font-size: 16px;
  color: #666;
  margin: 10px 0;
}

.decline-info {
  background: #f9f9f9;
  border-left: 4px solid #907030;
  padding: 20px;
  margin: 30px 0;
  text-align: left;
  border-radius: 5px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #333;
}

.info-value {
  color: #666;
  text-align: right;
}

.message-box {
  background: #f0f0f0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  color: var(--color-text);
  line-height: 1.6;
  text-wrap: balance;

  & p {
    font-size: 14px;
    margin: 0;
  }

  & p:not(:last-child) {
    margin-bottom: 10px;
  }
}

.acciones {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
  flex-wrap: wrap;
}

.btn {
  background-color: transparent;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  text-decoration: none;

  &:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
  }
}

.footer-note {
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  color: #999;
  font-size: 14px;

  & p {
    margin: 0;
  }
}

.modal__link {
  color: var(--color-secondary);
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;

  &.active {
    opacity: 1;
    visibility: visible;

    .modal__content {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

.modal__link {
  color: var(--color-secondary);
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

/* Contenido */
.modal__content {
  position: relative;
  background: var(--color-tertiary);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);

  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
  overflow: hidden;
}

/* Header */
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #ececec;
}

.modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
}

/* Botón cerrar */
.modal__close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-secondary);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;

  &:hover {
    transform: rotate(90deg);
    opacity: 0.7;
  }
}

/* Contenido scrolleable */
.modal__container {
  padding: 2rem;
  flex: 1;

  p:first-child {
    margin-top: 0;
  }
}

.modal__text {
  height: 400px;
  overflow-y: auto;
}

/* Scroll bonito */
.modal__text::-webkit-scrollbar {
  width: 6px;
}

.modal__text::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.formulario__radio {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  font-weight: 400;

  & input {
    display: inline-block;
    width: auto;
    margin-top: 0;
  }
}
