/* 365soft Cookie Consent — banner, preferences modal, external media placeholder */
.px-cookie {
  --px-orange: #ff8f01;
  --px-ink: #111722;
  --px-text: #283446;
  --px-muted: #667085;
  --px-line: #e8edf3;
  --px-dark: #080d18;
  font-family: 'Inter', Arial, sans-serif;
}

.px-cookie * {
  box-sizing: border-box;
}

/* ---------- Banner ---------- */
.px-cookie-banner {
  position: fixed;
  z-index: 100000;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 18px;
  pointer-events: none;
}

.px-cookie-banner[hidden] {
  display: none;
}

.px-cookie-banner-card {
  pointer-events: auto;
  display: flex;
  gap: 22px;
  align-items: flex-end;
  width: 100%;
  max-width: 1080px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 10px;
  color: rgba(255, 255, 255, .86);
  background: linear-gradient(135deg, #0c1119 0%, #12181f 58%, #1c130b 100%);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .38);
  animation: px-cookie-rise .38s ease;
}

@keyframes px-cookie-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.px-cookie-banner-body {
  flex: 1 1 auto;
  min-width: 0;
}

.px-cookie-banner-title {
  margin: 0 0 8px;
  color: #fff;
  font-family: 'Sora', Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.px-cookie-banner-text {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 13.5px;
  line-height: 1.7;
}

.px-cookie-banner-text strong {
  color: rgba(255, 255, 255, .92);
}

.px-cookie-banner-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- Buttons ---------- */
.px-cookie-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: 'Sora', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

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

.px-cookie-btn:hover {
  transform: translateY(-1px);
}

/* Accept and Reject share equal visual weight on purpose */
.px-cookie-btn-accept {
  color: #111722;
  background: var(--px-orange);
  box-shadow: 0 14px 32px rgba(255, 143, 1, .26);
}

.px-cookie-btn-accept:hover {
  background: #ff9f24;
}

.px-cookie-btn-reject {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
}

.px-cookie-btn-reject:hover {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .14);
}

.px-cookie-btn-customize {
  color: rgba(255, 255, 255, .82);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.px-cookie-btn-customize:hover {
  color: #fff;
}

.px-cookie-btn-ghost {
  color: var(--px-ink);
  border-color: var(--px-line);
  background: #fff;
}

.px-cookie-btn-ghost:hover {
  border-color: rgba(255, 143, 1, .5);
  background: rgba(255, 143, 1, .06);
}

/* ---------- Modal ---------- */
.px-cookie-modal-overlay {
  position: fixed;
  z-index: 100001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 13, 24, .58);
  backdrop-filter: blur(4px);
}

.px-cookie-modal-overlay[hidden] {
  display: none;
}

.px-cookie-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(88vh, 760px);
  border: 1px solid var(--px-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(8, 13, 24, .34);
  animation: px-cookie-pop .22s ease;
}

@keyframes px-cookie-pop {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: scale(1); }
}

.px-cookie-modal-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--px-line);
}

.px-cookie-modal-title {
  margin: 0 0 6px;
  color: var(--px-ink);
  font-family: 'Sora', Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
}

.px-cookie-modal-subtitle {
  margin: 0;
  color: var(--px-muted);
  font-size: 13px;
  line-height: 1.6;
}

.px-cookie-modal-close {
  display: inline-flex;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--px-line);
  border-radius: 6px;
  color: var(--px-muted);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.px-cookie-modal-close:hover {
  color: var(--px-ink);
  border-color: rgba(255, 143, 1, .5);
  background: rgba(255, 143, 1, .06);
}

.px-cookie-modal-close:focus-visible {
  outline: 2px solid #ff8f01;
  outline-offset: 2px;
}

.px-cookie-modal-body {
  overflow-y: auto;
  padding: 18px 26px;
  flex: 1 1 auto;
}

.px-cookie-category {
  padding: 16px 0;
  border-bottom: 1px solid var(--px-line);
}

.px-cookie-category:last-child {
  border-bottom: 0;
}

.px-cookie-category-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.px-cookie-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--px-ink);
  font-family: 'Sora', Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 800;
}

.px-cookie-category-badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--px-muted);
  background: var(--px-line);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.px-cookie-category-desc {
  margin: 8px 0 0;
  color: var(--px-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* Toggle switch */
.px-cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

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

.px-cookie-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d7dde5;
  transition: background .18s ease;
  cursor: pointer;
}

.px-cookie-switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: transform .18s ease;
}

.px-cookie-switch input:checked + .px-cookie-switch-track {
  background: var(--px-orange);
}

.px-cookie-switch input:checked + .px-cookie-switch-track::before {
  transform: translateX(20px);
}

.px-cookie-switch input:disabled + .px-cookie-switch-track {
  background: #ffd9a3;
  cursor: not-allowed;
  opacity: .9;
}

.px-cookie-switch input:focus-visible + .px-cookie-switch-track {
  outline: 2px solid #ff8f01;
  outline-offset: 2px;
}

.px-cookie-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 26px 24px;
  border-top: 1px solid var(--px-line);
}

.px-cookie-modal-footer .px-cookie-btn {
  flex: 0 0 auto;
}

.px-cookie-modal-footer-save {
  margin-right: auto;
}

@media (max-width: 767px) {
  .px-cookie-banner-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }

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

  .px-cookie-banner-actions .px-cookie-btn {
    width: 100%;
  }

  .px-cookie-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .px-cookie-modal-footer-save {
    margin-right: 0;
  }

  .px-cookie-modal-footer .px-cookie-btn {
    width: 100%;
  }
}

/* ---------- External media placeholder ---------- */
.px-external-media {
  position: relative;
}

.px-external-media-frame[hidden] {
  display: none;
}

.px-external-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 26px;
  border: 1px dashed var(--px-line, #e8edf3);
  border-radius: 10px;
  color: var(--px-text, #283446);
  background: var(--px-soft, #f7f9fc);
  font-family: 'Inter', Arial, sans-serif;
  text-align: left;
}

.px-external-media-placeholder-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ff8f01;
  background: rgba(255, 143, 1, .12);
  font-size: 17px;
}

.px-external-media-placeholder p {
  max-width: 520px;
  margin: 0;
  color: var(--px-muted, #667085);
  font-size: 13.5px;
  line-height: 1.7;
}

.px-external-media-placeholder .px-cookie-btn {
  margin-top: 2px;
}
