/* ========================================================
   Banner e Modal de Consentimento de Cookies (LGPD)
   Baseado no padrão de Mogi Guaçu adaptado para Holambra
   ======================================================== */

/* Barra principal do aviso inicial */
.cookie-consent-box {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  max-width: 780px;
  background-color: #e65100; /* Laranja mais vivo e equilibrado */
  color: #fff;
  padding: 16px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 99999;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-radius: 8px;
}

.cookie-consent-box p {
  flex: 1 1 100%;
  margin: 0 0 12px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #fff;
}

/* Botões da barra de consentimento */
.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

/* Botão "Mais informações" estilo pílula */
.cookie-buttons .btn-link {
  background-color: #fff;
  color: #111;
  border-radius: 25px;
  padding: 6px 16px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cookie-buttons .btn-link:hover,
.cookie-buttons .btn-link:focus {
  background-color: #fff3e0;
  color: #e65100;
  text-decoration: none;
  outline: none;
  cursor: pointer;
}

/* Botão "Recusar cookies" */
.cookie-buttons .btn-outline-danger {
  background-color: #dc3545;
  color: #fff;
  border-radius: 25px;
  border: 1px solid #dc3545;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.25s ease;
}

.cookie-buttons .btn-outline-danger:hover,
.cookie-buttons .btn-outline-danger:focus {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  outline: none;
  cursor: pointer;
}

/* Botão "Aceitar cookies" */
.cookie-buttons .btn-primary {
  background-color: #007bff;
  border: 1px solid #007bff;
  color: #fff;
  border-radius: 25px;
  padding: 6px 20px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.25s ease;
}

.cookie-buttons .btn-primary:hover,
.cookie-buttons .btn-primary:focus {
  background-color: #0056b3;
  border-color: #0056b3;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
  outline: none;
}

/* ---------------------- */
/* Modal de Preferências de Cookies */
#cookieModal .modal-dialog {
  max-height: 85vh;
  max-width: 680px;
  display: flex;
  flex-direction: column;
}

#cookieModal .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

#cookieModal .modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 16px 20px;
}

#cookieModal .modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #002147;
}

#cookieModal .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 20px;
  max-height: 60vh;
  font-size: 13.5px;
  color: #444;
  line-height: 1.6;
}

#cookieModal .modal-footer {
  flex-shrink: 0;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  position: sticky;
  bottom: 0;
  z-index: 1051;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#cookieModal .btn {
  border-radius: 25px !important;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------- */
/* Switch Toggle deslizante */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 15px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

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

input:checked + .slider {
  background-color: #007bff;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

input:disabled + .slider {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

input:disabled + .slider:before {
  background-color: #adb5bd;
}

/* Categorias de cookies */
.cookie-category {
  padding: 10px 0;
}

.cookie-category strong {
  color: #111;
  font-size: 14px;
}

/* ---------------------- */
/* Responsividade */
@media (max-width: 768px) {
  .cookie-consent-box {
    width: 92%;
    bottom: 15px;
    padding: 14px 16px;
  }
  .cookie-buttons {
    justify-content: center;
  }
  .cookie-buttons .btn {
    flex: 1 1 100%;
    text-align: center;
  }
  #cookieModal .modal-footer {
    justify-content: center;
  }
}

