/* ================================
   MODAL GENÉRICO - modal-generic.css
   ================================ */

/* ── Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay[aria-hidden="true"] {
  display: none;
}

.modal-overlay .modal-container {
  animation: modal-main 0.4s ease forwards;
}

/* ── Modal box ── */
.modal-container {
  background-color: #363636;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ── Close button ── */
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding-top: .3em;
  background: #1f1f1f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 1;
}

.modal-close:hover {
  background-color: #ed2828;
}

/* ── Scrollable content ── */
.modal-content {
  overflow-y: auto;
  padding: 2rem 1.5rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #ed2828 #1f1f1f;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #1f1f1f;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: #ed2828;
  border-radius: 3px;
}

/* ── Title ── */
.modal-content h2 {
  margin: 0 0 1.25rem;
  color: #fff;
  text-align: center;
  padding-right: 1.5rem;
  margin-top: 20px;
}

/* ── Table TyC ── */
.tyc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  color: #fff;
}

.tyc-table tr {
  border-bottom: 1px solid #1f1f1f;
}

.tyc-table tr:last-child {
  border-bottom: none;
}

.tyc-table tr:nth-child(odd) {
  background-color: #f3f3f3c2;
}

.tyc-table th {
  font-weight: 600;
  white-space: nowrap;
  width: 35%;
}

.tyc-table tr:nth-child(odd) th {
  color: #060606;
}

.tyc-table tr:nth-child(even) th {
  color: #ffffff;
}

.tyc-table td {
  text-align: left;
}

.tyc-table td p {
  margin: 0 0 0.5rem;
  padding:0;
}

.tyc-table td p:last-child {
  margin-bottom: 0;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .tyc-table,
  .tyc-table tbody,
  .tyc-table tr,
  .tyc-table th,
  .tyc-table td {
    display: revert;
    width: revert;
    text-align: revert;
    float: none;
  }

  .tyc-table tbody tr td::before {
    content: none;
    display: none;
    width: auto;
  }

  .tyc-table th {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
    padding: 1em 0.75em 0.25em;
  }

  .tyc-table td {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.25em 0.75em 0.75em;
  }
}

/* ── Animation ── */
@keyframes modal-main {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}