:root {
  --wpc-primary: #2563eb;
  --wpc-secondary: #e5e7eb;
  --wpc-text: #111827;
  --wpc-bg: #ffffff;
  --wpc-border: #e2e8f0;
  --wpc-heading: #0f172a;
  --wpc-link: #2563eb;
  --wpc-overlay: rgba(2, 6, 23, 0.5);
  --wpc-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wpc-font-size: 14px;
  --wpc-radius: 12px;
}
.wpc-banner {
  position: fixed;
  z-index: 2147483647;
  background: var(--wpc-bg);
  color: var(--wpc-text);
  width: min(1200px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  font-family: var(--wpc-font-family);
  font-size: var(--wpc-font-size);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--wpc-border);
  border-radius: var(--wpc-radius);
  line-height: 1.5;
  box-sizing: border-box;
}
.wpc-banner * {
  box-sizing: border-box;
}
.wpc-layout-bar-top {
  width: calc(100% - 32px);
  top: 16px;
  left: 16px;
}
.wpc-layout-bar-bottom {
  width: calc(100% - 32px);
  bottom: 16px;
  left: 16px;
}
.wpc-layout-box-bottom-left,
.wpc-layout-box-bottom-right {
  width: min(400px, calc(100% - 32px));
  bottom: 16px;
}
.wpc-layout-box-bottom-left { left: 16px; }
.wpc-layout-box-bottom-right { right: 16px; left: auto; }
.wpc-layout-popup-center {
  width: min(560px, calc(100% - 32px));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.wpc-layout-popup-center::before {
  content: "";
  position: fixed;
  inset: -100vmax;
  background: var(--wpc-overlay);
  z-index: -1;
  backdrop-filter: blur(4px);
}
.wpc-banner-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wpc-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wpc-cookie-icon {
  font-size: 24px;
  line-height: 1;
  animation: wpc-float 3s ease-in-out infinite;
  display: inline-block;
}
@keyframes wpc-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(10deg); }
}
.wpc-banner-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wpc-heading);
  line-height: 1.2;
}
.wpc-banner-text {
  margin: 0;
  color: var(--wpc-text);
  font-size: 0.95rem;
  opacity: 0.9;
}
.wpc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.wpc-btn {
  border: 1px solid var(--wpc-border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  color: var(--wpc-heading);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wpc-btn:focus-visible,
.wpc-revisit-btn:focus-visible,
#wpc-preference-modal input:focus-visible { 
  outline: 2px solid var(--wpc-primary); 
  outline-offset: 2px; 
}
.wpc-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}
.wpc-btn:active {
  transform: translateY(1px);
}
.wpc-btn-primary { 
  background: var(--wpc-primary); 
  color: #fff; 
  border-color: var(--wpc-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.wpc-btn-primary:hover {
  background-color: var(--wpc-link); 
  color: #fff;
  border-color: var(--wpc-link);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.wpc-btn-link { 
  background: transparent; 
  color: var(--wpc-text); 
  text-decoration: underline; 
  border-color: transparent; 
  padding: 10px 12px;
  opacity: 0.8;
}
.wpc-btn-link:hover {
  background: transparent;
  border-color: transparent;
  opacity: 1;
  color: var(--wpc-heading);
}
.wpc-policy-link {
  color: var(--wpc-text);
  font-size: 0.85rem;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.wpc-policy-link:hover {
  opacity: 1;
}

/* Modal */
#wpc-preference-modal {
  position: fixed;
  inset: 0;
  background: var(--wpc-overlay);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.wpc-modal-content {
  background: var(--wpc-bg);
  color: var(--wpc-text);
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  font-family: var(--wpc-font-family);
}
#wpc-pref-title {
  margin: 0 0 24px;
  color: var(--wpc-heading);
  font-size: 1.5rem;
  font-weight: 700;
}
.wpc-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--wpc-border);
  gap: 24px;
}
.wpc-toggle-copy {
  flex: 1;
}
.wpc-toggle-copy strong {
  display: block;
  color: var(--wpc-heading);
  font-size: 1rem;
  margin-bottom: 4px;
}
.wpc-toggle-copy small {
  display: block;
  font-size: 0.9rem;
  opacity: 0.75;
  line-height: 1.4;
}
.wpc-toggle-ui {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.wpc-toggle-ui input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.wpc-toggle-slider {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wpc-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wpc-toggle-ui input:checked + .wpc-toggle-slider {
  background: var(--wpc-primary);
}
.wpc-toggle-ui input:checked + .wpc-toggle-slider::after {
  transform: translateX(22px);
}
.wpc-toggle-ui input:disabled + .wpc-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}
.wpc-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: flex-end;
  border-top: 1px solid var(--wpc-border);
  padding-top: 24px;
}

/* Revisit Button */
.wpc-revisit-btn {
  position: fixed;
  bottom: 20px;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wpc-bg);
  color: var(--wpc-text);
  font-size: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 2147483647;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wpc-revisit-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.wpc-revisit-right { right: 20px; left: auto; }
.wpc-revisit-left { left: 20px; right: auto; }

/* Presets */
.wpc-preset-soft-card {
  border-radius: 20px;
  background: #fff;
  border: 0;
}
.wpc-preset-soft-card .wpc-banner-inner {
  background: linear-gradient(to bottom right, #ffffff, #f8fafc);
  border-radius: 20px;
}
.wpc-preset-soft-card .wpc-btn {
  border-radius: 999px;
  padding: 12px 24px;
}
.wpc-preset-soft-card .wpc-btn-primary {
  background: linear-gradient(135deg, var(--wpc-primary), var(--wpc-link));
  border: 0;
}

.wpc-preset-clean-panel {
  border-radius: 12px;
}
.wpc-preset-clean-panel .wpc-banner-inner {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}
.wpc-preset-clean-panel .wpc-banner-header {
  margin-right: auto;
  margin-bottom: 0;
}
.wpc-preset-clean-panel .wpc-banner-text {
  flex: 1 1 100%;
  margin-top: 8px;
}
.wpc-preset-clean-panel .wpc-banner-actions {
  margin-left: auto;
  margin-top: 0;
}

@media (min-width: 768px) {
  .wpc-preset-clean-panel .wpc-banner-text {
    flex: 1;
    margin-top: 0;
    margin-right: 24px;
  }
}

@media (max-width: 640px) {
  .wpc-banner {
    width: calc(100% - 24px);
    max-height: 85vh;
  }
  .wpc-layout-bar-top, .wpc-layout-bar-bottom,
  .wpc-layout-box-bottom-left, .wpc-layout-box-bottom-right {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }
  .wpc-layout-bar-top { top: 12px; bottom: auto; }
  
  .wpc-banner-inner {
    padding: 20px;
    gap: 12px;
  }
  .wpc-banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .wpc-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }
  .wpc-banner-header {
    margin-bottom: 4px;
  }
  .wpc-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}