/* ==========================================================================
   Seabra Group — Cookie Consent (banner + preferences modal)
   Self-contained, brand: #000 / gold #c69527 / Proza Libre
   ========================================================================== */

.sg-cc,
.sg-cc *,
.sg-cc *::before,
.sg-cc *::after {
  box-sizing: border-box;
}

.sg-cc {
  font-family: "Proza Libre", sans-serif;
  color: #2b2b2b;
}

.sg-cc[hidden] {
  display: none !important;
}

/* --- Banner ------------------------------------------------------------- */
.sg-cc-banner {
  position: fixed;
  z-index: 2147483000;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 64rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  animation: sg-cc-rise .35s ease both;
}

@keyframes sg-cc-rise {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.sg-cc-banner__text {
  flex: 1 1 20rem;
  min-width: 15rem;
}

.sg-cc-banner__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 .35rem;
  line-height: 1.3;
}

.sg-cc-banner__desc {
  font-size: .875rem;
  line-height: 1.5;
  color: #374151;
  margin: 0;
}

.sg-cc-banner__desc a {
  color: #c69527;
  text-decoration: underline;
}

.sg-cc-banner__actions {
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
  align-items: center;
}

/* --- Buttons (mirror site .button) -------------------------------------- */
.sg-cc-btn {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25rem;
  padding: .75rem 1.5rem;
  border-radius: 4px;
  border: 1px solid #000;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}

.sg-cc-btn:hover { opacity: .85; }

.sg-cc-btn--primary {
  background: #000;
  color: #fff;
}

.sg-cc-btn--gold {
  background: #c69527;
  border-color: #c69527;
  color: #fff;
}

.sg-cc-btn--secondary {
  background: transparent;
  color: #000;
}

.sg-cc-btn--sm {
  padding: .5rem 1rem;
  font-size: .875rem;
}

/* --- Modal -------------------------------------------------------------- */
.sg-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.sg-cc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  animation: sg-cc-fade .2s ease both;
}

@keyframes sg-cc-fade { from { opacity: 0; } to { opacity: 1; } }

.sg-cc-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 34rem;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  padding: 1.75rem;
  animation: sg-cc-rise .3s ease both;
}

.sg-cc-modal__close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  border-radius: 50%;
}

.sg-cc-modal__close:hover { background: #f3f4f6; color: #000; }

.sg-cc-modal__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 .5rem;
  padding-right: 2rem;
}

.sg-cc-modal__intro {
  font-size: .875rem;
  line-height: 1.55;
  color: #374151;
  margin: 0 0 1.25rem;
}

/* --- Category rows ------------------------------------------------------ */
.sg-cc-cat {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.sg-cc-cat__name {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 .25rem;
}

.sg-cc-cat__desc {
  font-size: .8125rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0;
}

/* --- Toggle switch ------------------------------------------------------ */
.sg-cc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 3rem;
  height: 1.625rem;
  margin-top: .1rem;
}

.sg-cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.sg-cc-switch__track {
  position: absolute;
  inset: 0;
  background: #cbcbcb;
  border-radius: 999px;
  transition: background-color .2s ease;
  pointer-events: none;
}

.sg-cc-switch__track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.125rem;
  height: 1.125rem;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.sg-cc-switch input:checked + .sg-cc-switch__track {
  background: #c69527;
}

.sg-cc-switch input:checked + .sg-cc-switch__track::before {
  transform: translateX(1.375rem);
}

.sg-cc-switch input:focus-visible + .sg-cc-switch__track {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.sg-cc-switch input:disabled {
  cursor: not-allowed;
}

.sg-cc-switch input:disabled + .sg-cc-switch__track {
  background: #c69527;
  opacity: .5;
}

/* --- Modal actions ------------------------------------------------------ */
.sg-cc-modal__actions {
  border-top: 1px solid #e5e7eb;
  margin-top: .5rem;
  padding-top: 1.25rem;
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
}

.sg-cc-modal__actions .sg-cc-btn { flex: 1 1 auto; }

body.sg-cc-noscroll { overflow: hidden; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 640px) {
  .sg-cc-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 1.1rem 1.15rem;
    gap: .9rem;
  }
  .sg-cc-banner__actions { width: 100%; }
  .sg-cc-banner__actions .sg-cc-btn { flex: 1 1 8rem; }
  .sg-cc-modal__dialog { padding: 1.35rem 1.15rem; }
}
