/**
 * PRINTERCONNECT MPS - COOKIE CONSENT & PRIVACY BANNER STYLES
 * Design: Dark Slate / Indigo Glassmorphism (WCAG 2.1 AA Compliant)
 */

.cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 440px;
  width: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  z-index: 99990;
  color: #0f172a;
  font-family: inherit;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.cookie-consent-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cookie-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cookie-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.cookie-banner-text {
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 18px;
}

.cookie-banner-text a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.cookie-banner-text a:hover {
  color: #a5b4fc;
}

.cookie-banner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.cookie-btn {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: none;
  font-family: inherit;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cookie-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.cookie-btn-secondary {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.cookie-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.4);
}

.cookie-btn-link {
  grid-column: 1 / -1;
  background: transparent;
  color: #64748b;
  padding: 6px;
  font-size: 12px;
  text-decoration: none;
}

.cookie-btn-link:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* Modal de Preferências Granulares */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal {
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff; border: 1px solid #e2e8f0;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  color: #e2e8f0;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.cookie-modal-overlay.open .cookie-modal {
  transform: scale(1);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.cookie-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
}

.cookie-modal-close:hover {
  background: rgba(51, 65, 85, 0.5);
  color: #0f172a;
}

.cookie-category {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cookie-category-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-badge-required {
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: #6366f1;
}

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

input:disabled + .cookie-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-category-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  padding-top: 16px;
}

/* Botão Reabrir Preferências (Selo Flutuante de Privacidade) */
.cookie-reopen-pill {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  z-index: 99980;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-reopen-pill:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

@media (max-width: 640px) {
  .cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 440px;
  width: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  z-index: 99990;
  color: #0f172a;
  font-family: inherit;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
  .cookie-banner-actions {
    grid-template-columns: 1fr;
  }
  .cookie-reopen-pill {
    bottom: 16px;
    left: 16px;
  }
}

