@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500&display=swap");

:root {
  --oferta-page: #f3f6fb;
  --oferta-surface: #ffffff;
  --oferta-surface-soft: #f8fafc;
  --oferta-line: #dbe3ee;
  --oferta-line-strong: #c5d2e4;
  --oferta-text: #1f2937;
  --oferta-muted: #64748b;
  --oferta-primary: #1456d9;
  --oferta-primary-soft: #eaf1ff;
  --oferta-success: #16834a;
  --oferta-success-soft: #e9f8ef;
  --oferta-danger: #b4232f;
  --oferta-warning-soft: #fff7df;
  --oferta-shadow: 0 18px 45px rgba(30, 41, 59, 0.1);
  --oferta-shadow-soft: 0 8px 22px rgba(30, 41, 59, 0.07);
}

body:has(.oferta) {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20, 86, 217, 0.12), transparent 34rem),
    linear-gradient(180deg, #f7faff 0%, var(--oferta-page) 42%, #f8fafc 100%);
}

.oferta {
  width: min(1200px, calc(100% - 2rem));
  margin: 2.5rem auto;
  color: var(--oferta-text);
  font-family: "Poppins", sans-serif;
}

.oferta-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.oferta-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--oferta-shadow);
}

.oferta-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--oferta-primary), #20a55a);
}

.oferta-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.6rem 1.75rem 1.35rem;
  border-bottom: 1px solid var(--oferta-line);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.9)),
    var(--oferta-surface);
}

.oferta-card-switches {
  display: grid;
  gap: 0.75rem;
}

.oferta-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: var(--oferta-primary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  text-transform: uppercase;
}

.oferta-card-kicker::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--oferta-success);
  box-shadow: 0 0 0 5px rgba(22, 131, 74, 0.12);
}

.oferta-card h1,
.oferta-section-title h2,
.oferta-section-title p,
.oferta p {
  margin: 0;
}

.oferta-card h1 {
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.8rem;
}

.oferta-switch {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  min-height: 64px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--oferta-line);
  border-radius: 8px;
  background: var(--oferta-surface);
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25rem;
  cursor: pointer;
  box-shadow: var(--oferta-shadow-soft);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.oferta-switch:hover {
  border-color: var(--oferta-line-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(30, 41, 59, 0.11);
}

.oferta-switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.oferta-switch-control {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #aeb9ca;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.oferta-switch-control::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.oferta-switch input[type="checkbox"]:checked + input + .oferta-switch-control {
  background: var(--oferta-success);
  box-shadow: 0 0 0 5px rgba(22, 131, 74, 0.13);
}

.oferta-switch input[type="checkbox"]:checked + input + .oferta-switch-control::after {
  transform: translateX(22px);
}

.oferta-switch input[type="checkbox"]:focus-visible + input + .oferta-switch-control {
  outline: 3px solid rgba(20, 86, 217, 0.28);
  outline-offset: 4px;
}

.oferta-section {
  padding: 1.45rem 1.75rem 1.65rem;
  background: var(--oferta-surface);
}

.oferta-section + .oferta-section {
  border-top: 1px solid var(--oferta-line);
}

.oferta-section--extra {
  background:
    linear-gradient(180deg, rgba(233, 248, 239, 0.9), rgba(255, 255, 255, 0.96) 56%),
    var(--oferta-surface);
}

.oferta-section--extra.is-visible {
  animation: ofertaExtraEntrada 0.25s ease;
}

.oferta-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.oferta-section-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #172033;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35rem;
}

.oferta-section-title h2::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 4px;
  background: var(--oferta-primary);
}

.oferta-section--extra .oferta-section-title h2::before {
  background: var(--oferta-success);
}

.oferta-section-title p {
  max-width: 430px;
  color: var(--oferta-muted);
  font-size: 0.86rem;
  line-height: 1.3rem;
  text-align: right;
}

.oferta-section-title--with-action {
  align-items: flex-start;
}

.oferta-section-title--with-action p {
  text-align: left;
}

.oferta-row-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.oferta-row {
  display: grid;
  grid-template-columns: 112px minmax(240px, 1fr) minmax(138px, 0.48fr) minmax(138px, 0.48fr) 142px;
  gap: 0.85rem;
  align-items: end;
  padding: 0.95rem;
  border: 1px solid #e0e7f1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 7px 18px rgba(30, 41, 59, 0.055);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.oferta-row:hover {
  border-color: #b8c8de;
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(30, 41, 59, 0.09);
}

.oferta-row-marker {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.oferta-row-marker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  border: 1px solid #d7e4fb;
  border-radius: 999px;
  background: var(--oferta-primary-soft);
  color: var(--oferta-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.oferta-section--extra .oferta-row-marker span {
  border-color: #cbeed8;
  background: var(--oferta-success-soft);
  color: var(--oferta-success);
}

.oferta-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.38rem;
}

.oferta-field label {
  color: #56667d;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1rem;
  text-transform: uppercase;
}

.oferta-field input {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.72rem;
  border: 1px solid #cfd9e8;
  border-radius: 7px;
  background: #ffffff;
  color: var(--oferta-text);
  font-family: "Roboto", sans-serif;
  font-size: 0.97rem;
  font-weight: 400;
  line-height: 1.2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(30, 41, 59, 0.04);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.oferta-field input:hover {
  border-color: #aebdd1;
  background: #fcfdff;
}

.oferta-field input:focus {
  border-color: var(--oferta-primary);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(20, 86, 217, 0.13);
}

.oferta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.58rem 0.82rem;
  border: 1px solid #cbd8e8;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
  color: #24344d;
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(30, 41, 59, 0.065);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.oferta-btn:hover {
  border-color: var(--oferta-primary);
  color: var(--oferta-primary);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 86, 217, 0.14);
}

.oferta-btn img {
  width: 19px;
  height: 19px;
}

.oferta-extras {
  display: grid;
  gap: 1rem;
}

.oferta-extras-list {
  display: grid;
  gap: 1rem;
}

.oferta-extra-add,
.oferta-extra-remove {
  width: fit-content;
  min-height: 42px;
  padding: 0.68rem 1rem;
  border: 1px solid var(--oferta-line);
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.oferta-extra-add {
  background: var(--oferta-primary-soft);
  color: var(--oferta-primary);
}

.oferta-extra-remove {
  background: var(--oferta-warning-soft);
  color: var(--oferta-danger);
}

.oferta-extra-add:hover,
.oferta-extra-remove:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.11);
}

.ofertas-btn {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  gap: 0.9rem;
  padding: 1.05rem 0 1.6rem;
  background: linear-gradient(rgba(248, 250, 252, 0), #f8fafc 32%);
}

.ofertas-btn button {
  min-width: 150px;
  min-height: 46px;
  padding: 0.78rem 1.35rem;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(30, 41, 59, 0.16);
  transition:
    box-shadow 0.18s ease,
    filter 0.18s ease,
    transform 0.18s ease;
}

.ofertas-btn button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(30, 41, 59, 0.19);
}

.oferta-btn-cancelar {
  background: linear-gradient(180deg, #d93d4a, var(--oferta-danger));
}

.oferta-btn-salvar {
  background: linear-gradient(180deg, #21a75d, var(--oferta-success));
}

.oferta-toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  min-width: 250px;
  max-width: 340px;
  padding: 0.95rem 1.1rem;
  border-radius: 8px;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.oferta-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.oferta-toast--success {
  background: var(--oferta-success);
}

.oferta-toast--error {
  background: var(--oferta-danger);
}

.oferta-cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
}

.oferta-cookie-banner.is-visible {
  display: flex;
}

.oferta-cookie-texto {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4rem;
}

.oferta-cookie-btn {
  flex-shrink: 0;
  border: 0;
  padding: 0.72rem 1.1rem;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.oferta-cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 255, 255, 0.16);
}

@keyframes ofertaExtraEntrada {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .oferta-card-header {
    grid-template-columns: 1fr;
  }

  .oferta-switch {
    max-width: none;
  }

  .oferta-row {
    grid-template-columns: 104px minmax(220px, 1fr) minmax(136px, 0.5fr) minmax(136px, 0.5fr);
  }

  .oferta-btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  body:has(.oferta) {
    background: var(--oferta-page);
  }

  .oferta {
    width: min(100% - 1rem, 1200px);
    margin: 1rem auto;
  }

  .oferta-form {
    gap: 1rem;
  }

  .oferta-card-header,
  .oferta-section {
    padding: 1rem;
  }

  .oferta-card h1 {
    font-size: 1.22rem;
    line-height: 1.5rem;
  }

  .oferta-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .oferta-section-title p {
    max-width: none;
    text-align: left;
  }

  .oferta-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.85rem;
  }

  .oferta-row-marker {
    min-height: auto;
  }

  .oferta-row-marker span {
    justify-content: flex-start;
  }

  .oferta-btn {
    grid-column: auto;
    width: 100%;
  }

  .oferta-extra-add,
  .oferta-extra-remove {
    width: 100%;
  }

  .ofertas-btn {
    position: static;
    flex-direction: column-reverse;
    gap: 0.65rem;
    padding: 0 0 1rem;
  }

  .ofertas-btn button {
    width: 100%;
  }

  .oferta-toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: 0;
    max-width: none;
  }

  .oferta-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .oferta-cookie-btn {
    width: 100%;
  }
}
