/* ==========================================================================
   KOTE studio - Cookie Consent Banner & Preferences Modal
   Stylistyka spójna z marką KOTE studio (kolory: paper, brand, secondary, red)
   ========================================================================== */

:root {
  --kote-cookie-bg: rgb(244, 241, 236);
  --kote-cookie-border: rgba(178, 112, 91, 0.28);
  --kote-cookie-text: rgb(32, 32, 32);
  --kote-cookie-muted: #5e5752;
  --kote-cookie-primary: rgb(204, 23, 54);
  --kote-cookie-primary-hover: #b8122f;
  --kote-cookie-secondary: rgb(178, 112, 91);
  --kote-cookie-pink: rgb(249, 207, 221);
  --kote-cookie-shadow: 0 16px 48px -8px rgba(42, 34, 30, 0.22);
}

/* Floating Banner Container */
#kote-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(520px, calc(100vw - 32px));
  background: var(--kote-cookie-bg);
  border: 1px solid var(--kote-cookie-border);
  border-radius: 18px;
  box-shadow: var(--kote-cookie-shadow);
  padding: 24px;
  z-index: 999999;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--kote-cookie-text);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#kote-cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header with Logo Sygnet */
.kote-cookie-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kote-cookie-sygnet {
  width: 24px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

.kote-cookie-title {
  margin: 0;
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--kote-cookie-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Description text */
.kote-cookie-desc {
  margin: 0 0 18px 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--kote-cookie-muted);
}

.kote-cookie-desc a {
  color: var(--kote-cookie-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kote-cookie-desc a:hover {
  color: var(--kote-cookie-primary);
}

/* Actions Row */
.kote-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.kote-cookie-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
}

.kote-cookie-btn:focus-visible {
  outline: 2px solid var(--kote-cookie-primary);
  outline-offset: 2px;
}

/* Accept All Button */
.kote-cookie-btn-primary {
  background: var(--kote-cookie-primary);
  color: #ffffff;
  border: 1px solid var(--kote-cookie-primary);
  flex: 1 1 auto;
}

.kote-cookie-btn-primary:hover {
  background: var(--kote-cookie-primary-hover);
  border-color: var(--kote-cookie-primary-hover);
  transform: translateY(-1px);
}

/* Reject Optional Button */
.kote-cookie-btn-secondary {
  background: transparent;
  color: var(--kote-cookie-text);
  border: 1px solid var(--kote-cookie-border);
}

.kote-cookie-btn-secondary:hover {
  background: rgba(178, 112, 91, 0.08);
  border-color: var(--kote-cookie-secondary);
}

/* Customize Link */
.kote-cookie-btn-link {
  background: none;
  border: none;
  color: var(--kote-cookie-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  margin-left: auto;
}

.kote-cookie-btn-link:hover {
  color: var(--kote-cookie-primary);
}

/* Expandable Preferences Section */
.kote-cookie-preferences {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, margin 0.35s ease, opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
  border-top: 1px solid transparent;
}

.kote-cookie-preferences.is-expanded {
  max-height: 480px;
  opacity: 1;
  margin-top: 18px;
  padding-top: 16px;
  border-top-color: var(--kote-cookie-border);
  overflow-y: auto;
}

.kote-cookie-group {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(178, 112, 91, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.kote-cookie-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.kote-cookie-group-title {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--kote-cookie-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kote-cookie-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--kote-cookie-pink);
  color: var(--kote-cookie-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kote-cookie-group-desc {
  margin: 6px 0 0 0;
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--kote-cookie-muted);
}

/* Switch Toggle */
.kote-cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

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

.kote-cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1cbc5;
  transition: .25s ease;
  border-radius: 24px;
}

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

.kote-cookie-switch input:checked + .kote-cookie-slider {
  background-color: var(--kote-cookie-secondary);
}

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

.kote-cookie-switch input:disabled + .kote-cookie-slider {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: #aba49d;
}

.kote-cookie-save-btn {
  margin-top: 10px;
  width: 100%;
}

/* Footer Link / Button */
.footer-cookie-btn {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-cookie-btn:hover {
  opacity: 1;
  color: var(--primary-red, #cc1736);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  #kote-cookie-banner {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px 24px 18px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .kote-cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .kote-cookie-btn {
    width: 100%;
  }

  .kote-cookie-btn-link {
    margin: 4px auto 0 auto;
    text-align: center;
  }
}
