/* Cookie Consent Manager - Moreira Braga Advogados */

:root {
  --cc-bg: #101322;
  --cc-text: #FAF9F6;
  --cc-btn-primary-bg: #D1AD65;
  --cc-btn-primary-text: #101322;
  --cc-btn-primary-hover: #EDC974;
  --cc-btn-secondary-bg: transparent;
  --cc-btn-secondary-text: #FAF9F6;
  --cc-btn-secondary-border: #FAF9F6;
  --cc-btn-secondary-hover: rgba(250, 249, 246, 0.1);
  --cc-modal-bg: #FAF9F6;
  --cc-modal-text: #101322;
  --cc-overlay: rgba(16, 19, 34, 0.75);
  --cc-border: rgba(49, 49, 49, 0.15);
  --cc-toggle-bg: #686A73;
  --cc-toggle-active: #D1AD65;
  --cc-focus-ring: #D1AD65;
}

/* Base Accessibility / Focus */
.cc-btn:focus-visible,
.cc-close-btn:focus-visible,
.cc-policy-link:focus-visible,
.cc-toggle input:focus-visible + .cc-slider,
.cc-load-map-btn:focus-visible {
  outline: 2px solid var(--cc-focus-ring);
  outline-offset: 2px;
}

/* Banner - Popup Compacto */
.cc-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: calc(100% - 48px);
  max-width: 420px;
  background-color: var(--cc-bg);
  color: var(--cc-text);
  padding: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border: 1px solid rgba(250, 249, 246, 0.1);
  border-radius: 8px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  visibility: hidden;
}

.cc-banner.cc-show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (max-width: 639px) {
  .cc-banner {
    bottom: 120px; /* Acima do botão WhatsApp (pode chegar a 150px) */
    left: 16px;
    width: calc(100% - 32px);
    max-width: none;
    padding: 1.25rem;
  }
}
@media (max-height: 700px) and (max-width: 639px) {
  .cc-banner {
    bottom: 155px; /* Empurra mais para cima em telas muito pequenas para não sobrepor */
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner {
    transition: opacity 0.15s ease;
    transform: none;
  }
}

.cc-banner-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cc-banner-text h2 {
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: var(--cc-btn-primary-bg);
  margin-top: 0;
}

.cc-banner-text p {
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}

.cc-policy-link-inline {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--cc-btn-primary-bg);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cc-policy-link-inline:hover, .cc-policy-link-inline:focus-visible {
  color: var(--cc-btn-primary-hover);
  outline: 2px solid var(--cc-focus-ring);
  outline-offset: 2px;
}

.cc-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-banner-primary-actions {
  display: flex;
  gap: 0.75rem;
}
.cc-banner-primary-actions > button {
  flex: 1;
}

@media (max-width: 400px) {
  .cc-banner-primary-actions {
    flex-direction: column;
  }
}

.cc-btn-text {
  background: transparent;
  border: none;
  color: var(--cc-text);
  opacity: 0.8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  padding: 0.5rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-align: center;
  transition: opacity 0.2s, color 0.2s;
  min-height: 44px; /* Touch target */
}
.cc-btn-text:hover, .cc-btn-text:focus-visible {
  opacity: 1;
  color: var(--cc-btn-primary-bg);
  outline: 2px solid var(--cc-focus-ring);
  outline-offset: 2px;
}

/* Buttons */
.cc-btn {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
  min-height: 44px; /* Touch target size */
}

.cc-btn-primary {
  background-color: var(--cc-btn-primary-bg);
  color: var(--cc-btn-primary-text);
}
.cc-btn-primary:hover {
  background-color: var(--cc-btn-primary-hover);
}

.cc-btn-secondary {
  background-color: var(--cc-btn-secondary-bg);
  color: var(--cc-btn-secondary-text);
  border: 1px solid var(--cc-btn-secondary-border);
}
.cc-btn-secondary:hover {
  background-color: var(--cc-btn-secondary-hover);
}

/* Modal */
.cc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--cc-overlay);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.cc-modal-overlay.cc-show {
  opacity: 1;
  visibility: visible;
}

.cc-modal {
  background-color: var(--cc-modal-bg);
  color: var(--cc-modal-text);
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}

.cc-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--cc-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--cc-modal-bg);
  z-index: 2;
}

.cc-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.cc-close-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--cc-modal-text);
  line-height: 1;
  padding: 0.5rem;
  margin: -0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-close-btn:hover {
  opacity: 1;
}

.cc-modal-body {
  padding: 1.5rem;
}

.cc-modal-intro {
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-top: 0;
  margin-bottom: 2rem;
}

.cc-policy-link {
  color: #101322;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-block;
  margin-top: 0.75rem;
}
.cc-policy-link:hover {
  color: var(--cc-btn-primary-bg);
}

/* Categories */
.cc-category {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--cc-border);
}
.cc-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cc-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cc-category-header h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  color: var(--cc-modal-text);
}

.cc-category p {
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.75;
  margin: 0;
}

/* Toggle Switch */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--cc-toggle-bg);
  transition: .3s;
  border-radius: 26px;
}

.cc-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .cc-slider {
  background-color: var(--cc-toggle-active);
}

input:checked + .cc-slider:before {
  transform: translateX(22px);
}

.cc-toggle-always-active {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--cc-toggle-bg);
  font-weight: 500;
  letter-spacing: 0.05em;
  background: rgba(104, 106, 115, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Modal Footer */
.cc-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cc-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: #f6f5f0;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.cc-modal-footer .cc-btn-secondary {
  color: var(--cc-modal-text);
  border-color: rgba(16, 19, 34, 0.2);
}
.cc-modal-footer .cc-btn-secondary:hover {
  background-color: rgba(16, 19, 34, 0.05);
}

@media (min-width: 640px) {
  .cc-modal-footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* Map Placeholder */
.google-maps-placeholder {
  width: 100%;
  height: 450px;
  background-color: #252936;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #FAF9F6;
  padding: 2rem;
}

.google-maps-placeholder h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.google-maps-placeholder p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 0;
  margin-bottom: 1.5rem;
  max-width: 450px;
  line-height: 1.6;
}

.google-maps-placeholder a {
  margin-top: 1rem;
  font-size: 0.75rem;
  text-decoration: underline;
  opacity: 0.7;
}

.google-maps-placeholder a:hover {
  opacity: 1;
}

.cc-load-map-btn {
  margin-top: 0.5rem;
  padding: 0.875rem 2rem;
}
