/* ================================================================
   FORMAN Medicina — Cookie Consent Banner (LGPD)
   ================================================================ */

#forman-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #0f2440;
  color: #e8edf4;
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .45);
  font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

#forman-consent.visible {
  transform: translateY(0);
}

.consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.consent__text {
  flex: 1 1 320px;
}

.consent__text a {
  color: #4a90e2;
  text-decoration: underline;
}

.consent__text a:hover {
  color: #7ab3ee;
}

.consent__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.consent__btn {
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: opacity .2s;
}

.consent__btn:hover {
  opacity: .85;
}

.consent__btn--accept {
  background: #4a90e2;
  color: #fff;
}

.consent__btn--reject {
  background: transparent;
  color: #e8edf4;
  border: 1px solid rgba(232, 237, 244, .35);
}

.consent__btn--customize {
  background: transparent;
  color: #a0b4cc;
  text-decoration: underline;
  padding: 9px 8px;
}

/* Modal */
#forman-consent-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, .6);
  align-items: center;
  justify-content: center;
}

#forman-consent-modal.open {
  display: flex;
}

.consent-modal__box {
  background: #0f2440;
  color: #e8edf4;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
  font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.consent-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.consent-modal__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.consent-modal__row:last-of-type {
  border-bottom: none;
}

.consent-modal__row-text {
  flex: 1;
}

.consent-modal__row-text strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
}

/* Toggle switch */
.consent-toggle {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  margin-top: 2px;
}

.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.consent-toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .2);
  cursor: pointer;
  transition: background .2s;
}

.consent-toggle input:checked + .consent-toggle__track {
  background: #4a90e2;
}

.consent-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}

.consent-toggle input:checked + .consent-toggle__track::after {
  transform: translateX(18px);
}

.consent-toggle input:disabled + .consent-toggle__track {
  opacity: .5;
  cursor: default;
}

.consent-modal__footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.consent-modal__save {
  flex: 1;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #4a90e2;
  color: #fff;
  transition: opacity .2s;
}

.consent-modal__save:hover {
  opacity: .85;
}

@media (max-width: 600px) {
  .consent__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .consent__actions {
    width: 100%;
  }

  .consent__btn--accept,
  .consent__btn--reject {
    flex: 1;
    text-align: center;
  }
}
