/* PStudio Cookie Consent — Banner styles
   CSS custom properties are injected inline by PHP from admin settings */

/* ── RESET ───────────────────────────────────────────────────────────── */
#pcc-overlay * {
  box-sizing: border-box;
  font-family: inherit;
}

#pcc-overlay h1,
#pcc-overlay h2,
#pcc-overlay h3,
#pcc-overlay h4,
#pcc-overlay p,
#pcc-overlay ul,
#pcc-overlay ol,
#pcc-overlay li,
#pcc-overlay figure {
  margin: 0;
  padding: 0;
}

/* ── OVERLAY ─────────────────────────────────────────────────────────── */
#pcc-overlay {
  position: fixed;
  inset: 0;
  background: var(--pcc-overlay, rgba(0, 0, 0, 0.6));
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

#pcc-overlay.pcc-visible {
  opacity: 1;
  visibility: visible;
}

/* ── MODAL CARD ──────────────────────────────────────────────────────── */
#pcc-modal {
  background: var(--pcc-bg, #ffffff);
  color: var(--pcc-text, #1a1a1a);
  border-radius: 20px;
  padding: 44px 48px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;

  transform: scale(0.95) translateY(8px);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

#pcc-overlay.pcc-visible #pcc-modal {
  transform: scale(1) translateY(0);
}

/* ── HEADER ──────────────────────────────────────────────────────────── */
.pcc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.pcc-modal-logo {
  max-height: 60px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pcc-modal-logo-placeholder {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pcc-primary, #0069b4);
  letter-spacing: 0.03em;
}

/* ── BODY ─────────────────────────────────────────────────────────────── */
.pcc-modal-body {
  margin-bottom: 32px;
}

.pcc-modal-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--pcc-text, #1a1a1a);
  display: none;
}

.pcc-modal-body p,
.pcc-modal-body a {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--pcc-text, #1a1a1a);
  opacity: 0.85;
}

.pcc-modal-body a,
.pcc-modal-body .pcc-manage-inline {
  opacity: 1;
  color: var(--pcc-primary, #0069b4);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  line-height: inherit;
}

/* ── PREFERENCES DRAWER ──────────────────────────────────────────────── */
#pcc-prefs {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 20px;
  margin-top: 4px;
  margin-bottom: 24px;
}

.pcc-prefs-category {
  margin-bottom: 12px;
}

.pcc-prefs-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: default;
}

.pcc-prefs-category-header strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.pcc-prefs-category-desc {
  font-size: 0.8rem;
  color: var(--pcc-text, #1a1a1a);
  opacity: 0.65;
  padding: 0 0 8px 0;
  line-height: 1.5;
}

/* Service list */
.pcc-services-toggle {
  background: none;
  border: none;
  padding: 2px 0 6px;
  font-size: 0.78rem;
  color: var(--pcc-primary, #0069b4);
  cursor: pointer;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pcc-services-toggle:hover { opacity: 1; }

.pcc-services-arrow { font-style: normal; }

.pcc-service-list {
  margin-top: 4px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcc-service-item {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
}

.pcc-service-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.pcc-service-item p {
  font-size: 0.78rem;
  opacity: 0.7;
  line-height: 1.4;
  margin-bottom: 4px;
}

.pcc-service-item small {
  font-size: 0.72rem;
  opacity: 0.5;
  font-family: monospace;
}

/* Toggle switch */
.pcc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.pcc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.pcc-toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pcc-toggle input:checked + .pcc-toggle-slider {
  background: var(--pcc-primary, #0069b4);
}

.pcc-toggle input:checked + .pcc-toggle-slider::before {
  transform: translateX(20px);
}

.pcc-toggle input:disabled + .pcc-toggle-slider {
  background: var(--pcc-primary, #0069b4);
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── FOOTER ───────────────────────────────────────────────────────────── */
.pcc-modal-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.pcc-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.pcc-footer-links a {
  font-size: 0.78rem;
  color: var(--pcc-text, #1a1a1a);
  opacity: 0.55;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}

.pcc-footer-links a:hover {
  opacity: 0.9;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────── */

/* Base — solo propiedades comunes a todas las variantes */
.pcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.1s,
    background 0.15s,
    color 0.15s;
}

.pcc-btn:active {
  transform: scale(0.98);
}

/* Primary — filled pill */
.pcc-btn-primary {
  background: var(--pcc-primary, #0069b4);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 52px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 220px;
}

.pcc-btn-primary:hover {
  filter: brightness(1.08);
}

/* Save — outlined pill */
.pcc-btn-save {
  background: none;
  border: 2px solid var(--pcc-primary, #0069b4);
  color: var(--pcc-primary, #0069b4);
  border-radius: 100px;
  padding: 12px 32px;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.pcc-btn-save:hover {
  background: var(--pcc-primary, #0069b4);
  color: #fff;
}

/* Link-style — texto plano */
.pcc-btn-link {
  background: none;
  border: none;
  border-radius: 0;
  color: var(--pcc-text, #1a1a1a);
  opacity: 0.5;
  font-size: 0.88rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  letter-spacing: 0;
  transition: opacity 0.15s;
}

.pcc-btn-link:hover {
  opacity: 0.85;
}

/* ── BOTTOM / TOP BAR VARIANTS ───────────────────────────────────────── */
#pcc-overlay.pcc-position-bottom,
#pcc-overlay.pcc-position-top {
  align-items: flex-end;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

#pcc-overlay.pcc-position-top {
  align-items: flex-start;
}

#pcc-overlay.pcc-position-bottom #pcc-modal,
#pcc-overlay.pcc-position-top #pcc-modal {
  max-width: 100%;
  width: 100%;
  border-radius: 0;
  padding: 20px 32px;
  pointer-events: all;
  transform: translateY(100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

#pcc-overlay.pcc-position-top #pcc-modal {
  transform: translateY(-100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

#pcc-overlay.pcc-position-bottom.pcc-visible #pcc-modal,
#pcc-overlay.pcc-position-top.pcc-visible #pcc-modal {
  transform: translateY(0);
}

#pcc-overlay.pcc-position-bottom .pcc-modal-body,
#pcc-overlay.pcc-position-top .pcc-modal-body {
  margin-bottom: 0;
}

#pcc-overlay.pcc-position-bottom .pcc-modal-footer,
#pcc-overlay.pcc-position-top .pcc-modal-footer {
  flex-direction: row;
  justify-content: center;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #pcc-modal {
    padding: 32px 24px;
    border-radius: 16px;
  }

  .pcc-modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pcc-btn-primary {
    width: 100%;
    min-width: unset;
  }

  .pcc-modal-footer {
    width: 100%;
  }
}

/* ── RE-OPEN BUTTON (floating) ────────────────────────────────────────── */
#pcc-reopen {
  position: fixed;
  bottom: 16px;
  left: 16px;
  background: var(--pcc-primary, #0069b4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

#pcc-reopen:hover {
  transform: scale(1.1);
}
