/* ============================================================
   PHNX.dev — Cookie Banner Styles
   Dark cinematic design · DSGVO/ePrivacy compliant
   ============================================================ */

/* --- Cookie Banner Container --- */
.phnx-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: none;
  justify-content: center;
  padding: 0 16px 24px;
  font-family: 'Archivo', sans-serif;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.phnx-cookie-banner.phnx-cookie-visible {
  display: flex;
}

.phnx-cookie-banner.phnx-cookie-slide-in {
  transform: translateY(0);
  opacity: 1;
}

.phnx-cookie-banner.phnx-cookie-slide-out {
  transform: translateY(100%);
  opacity: 0;
}

/* --- Inner Card --- */
.phnx-cookie-card {
  width: 100%;
  max-width: 600px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(200, 169, 110, 0.15);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(200, 169, 110, 0.05);
  color: #e8e8e8;
}

/* --- Header Text --- */
.phnx-cookie-header {
  margin-bottom: 16px;
}

.phnx-cookie-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.phnx-cookie-description {
  font-size: 13px;
  line-height: 1.6;
  color: #a0a0a0;
  margin: 0;
}

/* --- Button Row --- */
.phnx-cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.phnx-cookie-btn {
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: none;
  line-height: 1.4;
}

.phnx-cookie-btn:focus-visible {
  outline: 2px solid #c8a96e;
  outline-offset: 2px;
}

/* Accept All — Gold accent */
.phnx-cookie-btn-accept {
  background: linear-gradient(135deg, #c8a96e 0%, #b8944f 100%);
  color: #0e0e0e;
  flex: 1;
  min-width: 140px;
}

.phnx-cookie-btn-accept:hover {
  background: linear-gradient(135deg, #d4b87a 0%, #c8a96e 100%);
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.35);
  transform: translateY(-1px);
}

/* Necessary Only — Subtle */
.phnx-cookie-btn-necessary {
  background: rgba(255, 255, 255, 0.06);
  color: #c8c8c8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  min-width: 140px;
}

.phnx-cookie-btn-necessary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Settings Toggle — Ghost */
.phnx-cookie-btn-settings {
  background: transparent;
  color: #c8a96e;
  border: 1px solid rgba(200, 169, 110, 0.3);
  flex: 0 0 auto;
}

.phnx-cookie-btn-settings:hover {
  background: rgba(200, 169, 110, 0.08);
  border-color: rgba(200, 169, 110, 0.5);
}

/* --- Detail / Settings Panel --- */
.phnx-cookie-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.phnx-cookie-detail.phnx-cookie-detail-open {
  max-height: 500px;
  opacity: 1;
  margin-top: 16px;
}

.phnx-cookie-detail-inner {
  border-top: 1px solid rgba(200, 169, 110, 0.1);
  padding-top: 16px;
}

/* --- Category Row --- */
.phnx-cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.phnx-cookie-category:last-child {
  border-bottom: none;
}

.phnx-cookie-category-info {
  flex: 1;
}

.phnx-cookie-category-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phnx-cookie-category-always {
  font-size: 10px;
  font-weight: 500;
  color: #c8a96e;
  background: rgba(200, 169, 110, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.phnx-cookie-category-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #888;
  margin: 0;
}

/* --- Toggle Switch --- */
.phnx-cookie-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

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

.phnx-cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transition: background 0.3s ease;
}

.phnx-cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #666;
  border-radius: 50%;
  transition: transform 0.3s ease, background 0.3s ease;
}

.phnx-cookie-toggle input:checked + .phnx-cookie-toggle-slider {
  background: rgba(200, 169, 110, 0.3);
}

.phnx-cookie-toggle input:checked + .phnx-cookie-toggle-slider::before {
  transform: translateX(20px);
  background: #c8a96e;
}

.phnx-cookie-toggle input:disabled + .phnx-cookie-toggle-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

.phnx-cookie-toggle input:disabled:checked + .phnx-cookie-toggle-slider {
  background: rgba(200, 169, 110, 0.2);
}

.phnx-cookie-toggle input:disabled:checked + .phnx-cookie-toggle-slider::before {
  background: #c8a96e;
}

.phnx-cookie-toggle input:focus-visible + .phnx-cookie-toggle-slider {
  outline: 2px solid #c8a96e;
  outline-offset: 2px;
}

/* --- Save Button in Detail --- */
.phnx-cookie-btn-save {
  background: linear-gradient(135deg, #c8a96e 0%, #b8944f 100%);
  color: #0e0e0e;
  width: 100%;
  margin-top: 16px;
  padding: 11px 18px;
}

.phnx-cookie-btn-save:hover {
  background: linear-gradient(135deg, #d4b87a 0%, #c8a96e 100%);
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.35);
  transform: translateY(-1px);
}

/* --- Floating Reopen Button --- */
.phnx-cookie-floating {
  position: fixed;
  bottom: 20px;
  left: 20px !important;
  right: auto !important;
  z-index: 99998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200, 169, 110, 0.2);
  color: #c8a96e;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  padding: 0;
  font-family: 'Archivo', sans-serif;
}

.phnx-cookie-floating:hover {
  background: rgba(200, 169, 110, 0.15);
  border-color: rgba(200, 169, 110, 0.4);
  box-shadow: 0 4px 32px rgba(200, 169, 110, 0.2);
  transform: scale(1.08);
}

.phnx-cookie-floating:focus-visible {
  outline: 2px solid #c8a96e;
  outline-offset: 2px;
}

.phnx-cookie-floating.phnx-cookie-floating-visible {
  display: flex;
}

/* Cookie icon SVG */
.phnx-cookie-floating svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .phnx-cookie-banner {
    padding: 0 8px 12px;
  }

  .phnx-cookie-card {
    border-radius: 14px 14px 10px 10px;
    padding: 20px 18px 18px;
  }

  .phnx-cookie-title {
    font-size: 16px;
  }

  .phnx-cookie-description {
    font-size: 12px;
  }

  .phnx-cookie-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .phnx-cookie-btn {
    width: 100%;
    text-align: center;
    padding: 11px 16px;
  }

  .phnx-cookie-category {
    gap: 10px;
    padding: 10px 0;
  }

  .phnx-cookie-floating {
    bottom: 14px;
    left: 14px !important;
    right: auto !important;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .phnx-cookie-floating svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 641px) {
  .phnx-cookie-banner {
    padding: 0 16px 28px;
  }
}

/* --- Print: hide cookie UI --- */
@media print {
  .phnx-cookie-banner,
  .phnx-cookie-floating {
    display: none !important;
  }
}
