/**
 * WP GA4 Consent Master PRO - Enhanced Styles
 * Version: 3.5.0
 * Prefix: wgcm-
 */

/* ===== OVERLAY BLOKUJĄCY ===== */
.wgcm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Zmiana opacity z 0.7 na 0.4 (40% zaciemnienia) */
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 99998; /* Pod banerem */
  backdrop-filter: blur(3px);
  animation: wgcm-fade-in 0.3s ease-out;
  /* KRYTYCZNE: dodanie pointer-events dla blokowania GDPR */
  pointer-events: all !important;
  cursor: not-allowed;
}

@keyframes wgcm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== GŁÓWNY BANER ===== */
.wgcm-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999; /* NAD overlay i NAD Elementor */
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 25px 20px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  animation: wgcm-slide-up 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes wgcm-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Kontener */
.wgcm-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Widoki (podstawowy / szczegółowy) */
.wgcm-view {
  display: block;
}

/* ===== TREŚĆ ===== */
.wgcm-content {
  margin-bottom: 20px;
}

.wgcm-heading {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  /* Wymuszenie białego koloru nagłówka dla ciemnego tła */
  color: #ffffff !important;
  line-height: 1.3;
}

.wgcm-text {
  margin: 0 0 15px 0;
  font-size: 15px;
  color: #e0e0e0;
  line-height: 1.6;
}

.wgcm-privacy-link {
  color: #4caf50;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.wgcm-privacy-link:hover {
  color: #66bb6a;
}

/* ===== KATEGORIE CIASTECZEK ===== */
.wgcm-category {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  margin-bottom: 12px;
  border-radius: 8px;
  /* Usunięto hardcoded border color - będzie nadpisany inline CSS z kolorem przycisku Zapisz */
  border-left: 4px solid;
  transition: background 0.2s ease;
}

.wgcm-category:hover {
  background: rgba(255, 255, 255, 0.08);
}

.wgcm-category-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.wgcm-category-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #4caf50;
}

.wgcm-category-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.wgcm-category-name {
  font-size: 16px;
  color: #ffffff;
}

.wgcm-category-name small {
  color: #aaa;
  font-size: 13px;
  margin-left: 6px;
}

.wgcm-category-desc {
  margin: 0;
  font-size: 13px;
  color: #bbb;
  padding-left: 32px;
  line-height: 1.5;
}

/* ===== PRZYCISKI ===== */
.wgcm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Wszystkie style przycisków z !important aby nie było nadpisywania przez motywy */
.wgcm-btn {
  padding: 14px 28px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  outline: none !important;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

.wgcm-btn:focus {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

/* Poszczególne przyciski - kolory nadpisywane inline CSS */
.wgcm-btn-accept {
  /* Kolor z ustawień + !important */
}

.wgcm-btn-settings {
  /* Kolor z ustawień + !important */
}

.wgcm-btn-reject {
  /* Kolor z ustawień + !important */
}

.wgcm-btn-save {
  /* Kolor z ustawień + !important */
}

/* ===== ANIMACJE UKRYWANIA ===== */
.wgcm-banner.wgcm-hidden,
.wgcm-overlay.wgcm-hidden {
  animation: wgcm-fade-out 0.3s ease-in forwards;
}

@keyframes wgcm-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Dodanie stylów dla stopki z linkiem INB Marketing */
/* ===== STOPKA BANERA ===== */
.wgcm-footer {
  /* Zmiana z text-align: right na center */
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wgcm-made-with {
  font-size: 12px;
  color: #999;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wgcm-heart {
  display: inline-block;
  animation: wgcm-heartbeat 1.5s ease-in-out infinite;
  font-size: 14px;
}

@keyframes wgcm-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  10%,
  30% {
    transform: scale(1.2);
  }
  20%,
  40% {
    transform: scale(1);
  }
}

.wgcm-inb-link {
  color: #4caf50;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.wgcm-inb-link:hover {
  color: #66bb6a;
  text-decoration: underline;
}

/* Ikona zarządzania preferencjami - pływająca */
.wgcm-float-icon {
  position: fixed !important;
  /* Usunięto domyślny bottom, będzie ustawiany tylko inline */
  left: 20px;
  z-index: 99998; /* Niższy niż banner */
  width: 60px;
  height: 60px;
  /* Usunięto border i wymuszono transparent background */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, filter 0.3s ease !important;
  animation: wgcm-float-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  padding: 0 !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  overflow: visible;
  flex-shrink: 0;
  /* Dodano touch-action dla lepszej obsługi mobile */
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

@keyframes wgcm-float-in {
  from {
    transform: scale(0) translateY(100px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.wgcm-float-icon:hover {
  transform: scale(1.15) !important;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5)) !important;
}

.wgcm-float-icon:active {
  transform: scale(0.95) !important;
}

/* Zapewnienie że SVG renderuje się bez tła i bez obramowania */
.wgcm-float-icon svg {
  width: 60px !important;
  height: 60px !important;
  display: block !important;
  /* Dodano pointer-events: none aby SVG nie blokowało kliknięć */
  pointer-events: none !important;
  /* Wymuszono brak tła i obramowania dla SVG */
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* Dodanie klasy dla pozycji prawej */
.wgcm-float-icon.wgcm-position-right {
  left: auto;
  right: 20px;
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 768px) {
  .wgcm-banner {
    padding: 20px 15px;
  }

  .wgcm-heading {
    font-size: 18px;
  }

  .wgcm-text {
    font-size: 14px;
  }

  .wgcm-actions {
    flex-direction: column;
  }

  .wgcm-btn {
    width: 100%;
    padding: 16px 24px;
  }

  .wgcm-category {
    padding: 12px;
  }

  .wgcm-category-name {
    font-size: 15px;
  }

  /* Dostosowanie stopki dla mobile */
  .wgcm-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 12px;
  }

  .wgcm-made-with {
    font-size: 11px;
  }

  /* Usunięto media query dla bottom - jest inline w HTML */
  /* Pozycja ikony na mobile - left/right */
  .wgcm-float-icon {
    left: 15px;
  }

  .wgcm-float-icon.wgcm-position-right {
    left: auto;
    right: 15px;
  }

  /* Usunięcie zmniejszania rozmiaru SVG na mobile - stała wysokość 48px */
}

@media (max-width: 480px) {
  .wgcm-banner {
    padding: 16px 12px;
    max-height: 85vh;
  }

  .wgcm-heading {
    font-size: 16px;
  }

  .wgcm-text {
    font-size: 13px;
  }

  .wgcm-btn {
    padding: 14px 20px;
    font-size: 14px;
  }

  .wgcm-made-with {
    font-size: 10px;
  }

  .wgcm-float-icon {
    left: 12px;
  }

  .wgcm-float-icon.wgcm-position-right {
    left: auto;
    right: 12px;
  }

  /* Usunięcie zmniejszania rozmiaru SVG na mobile - stała wysokość 48px */
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-contrast: high) {
  .wgcm-banner {
    border-top: 4px solid #ffffff;
  }

  .wgcm-btn-reject {
    border-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wgcm-banner,
  .wgcm-overlay,
  .wgcm-btn,
  .wgcm-category {
    animation: none;
    transition: none;
  }
}

/* ===== SCROLLBAR (dla długiej listy kategorii) ===== */
.wgcm-banner::-webkit-scrollbar {
  width: 8px;
}

.wgcm-banner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.wgcm-banner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.wgcm-banner::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
