/* ============================================================
   Cookie Consent Banner - Parapety Plus
   No overlay - banner sits at bottom, page fully usable
   ============================================================ */

/* Banner - fixed bottom, no overlay, no blocking */
#pp-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: min(660px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 22px 28px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid #3B82F6;
  pointer-events: all;
}

#pp-cookie-banner.pp-cookie-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Top row: icon + title inline */
.pp-cookie-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pp-cookie-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.pp-cookie-title {
  font-size: 1rem;
  font-weight: 700;
  color: #362d2d;
  margin: 0;
  line-height: 1.3;
}

/* Body text */
.pp-cookie-text {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.pp-cookie-link {
  color: #3B82F6;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pp-cookie-link:hover {
  color: #1d4ed8;
}

/* Buttons row */
.pp-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pp-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.pp-btn-primary {
  background: #362d2d;
  color: #ffffff;
  border-color: #362d2d;
}
.pp-btn-primary:hover {
  background: #1a1414;
  border-color: #1a1414;
}

.pp-btn-secondary {
  background: #ffffff;
  color: #362d2d;
  border-color: #362d2d;
}
.pp-btn-secondary:hover {
  background: #f5f4f4;
}

.pp-btn-ghost {
  background: transparent;
  color: #3B82F6;
  border-color: transparent;
  padding-left: 2px;
  padding-right: 2px;
}
.pp-btn-ghost:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Back button */
.pp-cookie-back {
  background: none;
  border: none;
  color: #3B82F6;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.pp-cookie-back:hover { color: #1d4ed8; }

/* Category rows */
.pp-cookie-category {
  border-top: 1px solid #e5e7eb;
  padding: 12px 0;
}
.pp-cookie-category:last-of-type {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 4px;
}

.pp-cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.pp-cookie-category-header strong {
  font-size: 0.88rem;
  color: #362d2d;
  display: block;
  margin-bottom: 2px;
}

.pp-cookie-category-desc {
  font-size: 0.79rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.pp-toggle-always {
  font-size: 0.75rem;
  font-weight: 600;
  color: #16a34a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toggle switch */
.pp-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
  cursor: pointer;
}

.pp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.pp-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 23px;
  transition: background 0.22s ease;
}

.pp-toggle-slider::before {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pp-toggle input:checked + .pp-toggle-slider { background: #3B82F6; }
.pp-toggle input:checked + .pp-toggle-slider::before { transform: translateX(19px); }
.pp-toggle input:focus-visible + .pp-toggle-slider { outline: 2px solid #3B82F6; outline-offset: 2px; }

/* Mobile - full width bar at very bottom */
@media (max-width: 520px) {
  #pp-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 14px 14px 0 0;
    border-left: none;
    border-top: 4px solid #3B82F6;
    transform: translateY(20px);
    padding: 18px 16px 24px;
  }

  #pp-cookie-banner.pp-cookie-visible {
    transform: translateY(0);
  }

  .pp-cookie-actions {
    flex-direction: column;
  }

  .pp-btn {
    width: 100%;
    text-align: center;
    padding: 11px 18px;
  }

  .pp-btn-ghost {
    text-align: center;
  }
}
