.ph-cookie-banner,
.ph-cookie-banner *,
.ph-cookie-fab,
.ph-cookie-media-placeholder,
.ph-cookie-media-placeholder * {
  box-sizing: border-box;
}

.ph-cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(183, 151, 91, 0.42);
  background: rgba(36, 40, 37, 0.985);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  color: #f7f4ee;
  font-family: "Poppins", Arial, sans-serif;
}

.ph-cookie-banner[hidden],
.ph-cookie-panel[hidden],
.ph-cookie-fab[hidden] {
  display: none !important;
}

.ph-cookie-main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.ph-cookie-copy {
  flex: 1 1 420px;
}

.ph-cookie-title {
  margin: 0 0 6px;
  color: #e3c384;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
}

.ph-cookie-message,
.ph-cookie-description {
  margin: 0;
  color: rgba(247, 244, 238, 0.76);
  font-size: 12px;
  line-height: 1.65;
}

.ph-cookie-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ph-cookie-button {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(247, 244, 238, 0.34);
  border-radius: 0;
  background: transparent;
  color: #f7f4ee;
  cursor: pointer;
  font: 600 10px/1.25 "Poppins", Arial, sans-serif;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.ph-cookie-button:hover,
.ph-cookie-button:focus-visible {
  border-color: #e3c384;
  color: #e3c384;
  outline: none;
}

.ph-cookie-button-primary {
  border-color: #3f9b57;
  background: #3f9b57;
  color: #ffffff;
}

.ph-cookie-button-primary:hover,
.ph-cookie-button-primary:focus-visible {
  border-color: #58ad6e;
  background: #58ad6e;
  color: #ffffff;
}

.ph-cookie-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(183, 151, 91, 0.25);
}

.ph-cookie-category {
  padding: 13px;
  border: 1px solid rgba(247, 244, 238, 0.12);
  background: rgba(247, 244, 238, 0.025);
}

.ph-cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.ph-cookie-category-name {
  color: #f7f4ee;
  font-size: 12px;
  font-weight: 600;
}

.ph-cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin: 0;
}

.ph-cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ph-cookie-slider {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(247, 244, 238, 0.34);
  border-radius: 999px;
  background: #3d4340;
  cursor: pointer;
}

.ph-cookie-slider::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(247, 244, 238, 0.72);
  content: "";
  transition: transform 0.2s, background 0.2s;
}

.ph-cookie-switch input:checked + .ph-cookie-slider {
  border-color: #3f9b57;
  background: rgba(63, 155, 87, 0.3);
}

.ph-cookie-switch input:checked + .ph-cookie-slider::before {
  transform: translateX(16px);
  background: #58ad6e;
}

.ph-cookie-switch input:focus-visible + .ph-cookie-slider {
  outline: 2px solid #e3c384;
  outline-offset: 2px;
}

.ph-cookie-switch input:disabled + .ph-cookie-slider {
  cursor: not-allowed;
  opacity: 0.72;
}

.ph-cookie-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1;
  padding-top: 4px;
}

.ph-cookie-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #3f9b57;
  border-radius: 50%;
  background: #242825;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color: #e3c384;
  cursor: pointer;
  font-size: 22px;
}

.ph-cookie-fab:hover,
.ph-cookie-fab:focus-visible {
  background: #3d4340;
  outline: none;
}

.ph-cookie-media-placeholder {
  display: flex;
  min-height: 260px;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  border: 1px dashed rgba(183, 151, 91, 0.48);
  background: #2e332f;
  color: rgba(247, 244, 238, 0.76);
  text-align: center;
}

.ph-cookie-media-placeholder p {
  max-width: 440px;
  margin: 0;
  font: 400 13px/1.65 "Poppins", Arial, sans-serif;
}

@media (max-width: 900px) {
  .ph-cookie-main {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .ph-cookie-copy {
    flex: none;
  }

  .ph-cookie-actions {
    justify-content: flex-start;
  }

  .ph-cookie-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ph-cookie-fab {
    bottom: 88px;
  }
}

@media (max-width: 560px) {
  .ph-cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-height: calc(100vh - 20px);
    padding: 17px;
    overflow-y: auto;
  }

  .ph-cookie-title {
    font-size: 22px;
  }

  .ph-cookie-actions,
  .ph-cookie-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ph-cookie-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-cookie-banner *,
  .ph-cookie-fab {
    transition: none !important;
  }
}
