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

/* ===== OVERLAY BLOKUJĄCY ===== */
.wgcm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 99998; /* Pod banerem */
  backdrop-filter: blur(3px);
  animation: wgcm-fade-in 0.3s ease-out;
  /* Opacity zmienione na 0.4 (40%) przez inline styles w PHP */
}

@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;
  border-left: 4px solid #4caf50;
  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;
}

.wgcm-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wgcm-btn:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.wgcm-btn:active {
  transform: scale(0.97);
}

.wgcm-btn-accept {
  background-color: #4caf50;
  color: #ffffff;
}

.wgcm-btn-accept:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.wgcm-btn-settings {
  background-color: #2196f3;
  color: #ffffff;
}

.wgcm-btn-settings:hover {
  background-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.wgcm-btn-reject {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #666;
}

.wgcm-btn-reject:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #999;
}

/* ===== 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 {
  text-align: right;
  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;
}

/* Dodanie stylów dla pływającej ikony zarządzania (lewy dolny róg) */
/* ===== PŁYWAJĄCA IKONA ZARZĄDZANIA ===== */
.wgcm-float-icon {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99997; /* Poniżej banera, ale nad resztą */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #4caf50;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: wgcm-float-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@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.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.wgcm-float-icon svg {
  width: 28px;
  height: 28px;
}

/* ===== 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;
  }

  /* Zmniejszenie ikony na mobile */
  .wgcm-float-icon {
    width: 48px;
    height: 48px;
    bottom: 15px;
    left: 15px;
  }

  .wgcm-float-icon svg {
    width: 24px;
    height: 24px;
  }
}

@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 {
    width: 44px;
    height: 44px;
    bottom: 12px;
    left: 12px;
  }

  .wgcm-float-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* ===== 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);
}
