/* ==========================================================================
   Towly — banner y panel de cookies
   ========================================================================== */

.towly-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  max-width: 720px;
  margin: 0 auto;
  background: #000000;
  color: #ffffff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  display: none;
  gap: 16px;
  align-items: flex-start;
  font-family: "Montserrat", sans-serif;
}

.towly-cookie-banner.is-visible {
  display: flex;
}

.towly-cookie-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #C7CDD6;
}

.towly-cookie-banner p a {
  color: #FFD110;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.towly-cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.towly-cookie-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  line-height: 1.2;
}

.towly-cookie-btn--accept {
  background: #FFD110;
  color: #000000;
}

.towly-cookie-btn--accept:hover {
  background: #DBB202;
}

.towly-cookie-btn--reject {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.towly-cookie-btn--ghost {
  background: #ffffff;
  color: #000000;
}

.towly-cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.towly-cookie-overlay.is-visible {
  display: flex;
}

.towly-cookie-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 26px 22px;
  font-family: "Montserrat", sans-serif;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.4);
}

.towly-cookie-modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #000000;
}

.towly-cookie-modal > p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #5B6472;
}

.towly-cookie-modal > p a {
  color: #000000;
  font-weight: 700;
}

.towly-cookie-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid #E4E7EC;
}

.towly-cookie-row h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #000000;
}

.towly-cookie-row p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5B6472;
}

.towly-cookie-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.towly-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.towly-cookie-switch span {
  position: absolute;
  inset: 0;
  background: #E4E7EC;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.towly-cookie-switch span::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.towly-cookie-switch input:checked + span {
  background: #FFD110;
}

.towly-cookie-switch input:checked + span::after {
  transform: translateX(18px);
}

.towly-cookie-switch input:disabled + span {
  background: #22C55E;
  cursor: not-allowed;
}

.towly-cookie-switch input:disabled + span::after {
  transform: translateX(18px);
}

.towly-cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.towly-cookie-modal-actions .towly-cookie-btn {
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .towly-cookie-banner {
    flex-direction: column;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px 16px;
  }

  .towly-cookie-banner-actions,
  .towly-cookie-modal-actions {
    width: 100%;
  }

  .towly-cookie-banner-actions .towly-cookie-btn,
  .towly-cookie-modal-actions .towly-cookie-btn {
    flex: 1 1 100%;
    text-align: center;
  }
}
