/* The Plant Roast — Cookie Consent v1.0.0 */

:root {
  --tpr-cc-bg: #fbf7ef;
  --tpr-cc-text: #2b2520;
  --tpr-cc-muted: #6b6258;
  --tpr-cc-border: #e3dbc9;
  --tpr-cc-primary: #2d4739;
  --tpr-cc-primary-text: #ffffff;
  --tpr-cc-primary-hover: #1f3328;
  --tpr-cc-outline: #2d4739;
  --tpr-cc-overlay-bg: rgba(20, 17, 12, 0.65);
  --tpr-cc-radius: 8px;
  --tpr-cc-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.tpr-cc-banner,
.tpr-cc-modal,
.tpr-cc-overlay {
  box-sizing: border-box;
  font-family: inherit;
}

.tpr-cc-banner *,
.tpr-cc-modal * {
  box-sizing: border-box;
}

/* Bottom banner */
.tpr-cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  background: var(--tpr-cc-bg);
  color: var(--tpr-cc-text);
  border-top: 1px solid var(--tpr-cc-border);
  box-shadow: var(--tpr-cc-shadow);
  animation: tpr-cc-slide-up 0.25s ease-out;
}

@keyframes tpr-cc-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.tpr-cc-banner__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.tpr-cc-banner__text {
  flex: 1 1 420px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.tpr-cc-banner__text a {
  color: var(--tpr-cc-primary);
  text-decoration: underline;
  font-weight: 600;
}

.tpr-cc-gpc-note {
  flex: 1 1 100%;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--tpr-cc-muted);
}

.tpr-cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* Buttons */
.tpr-cc-btn {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--tpr-cc-radius);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tpr-cc-btn--primary {
  background: var(--tpr-cc-primary);
  color: var(--tpr-cc-primary-text);
}
.tpr-cc-btn--primary:hover { background: var(--tpr-cc-primary-hover); }

.tpr-cc-btn--outline {
  background: transparent;
  color: var(--tpr-cc-outline);
  border-color: var(--tpr-cc-outline);
}
.tpr-cc-btn--outline:hover { background: rgba(45, 71, 57, 0.08); }

.tpr-cc-btn--text {
  background: transparent;
  color: var(--tpr-cc-muted);
  text-decoration: underline;
  padding: 9px 12px;
}
.tpr-cc-btn--text:hover { color: var(--tpr-cc-text); }

/* Preferences Modal Overlay */
.tpr-cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: var(--tpr-cc-overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tpr-cc-modal {
  background: var(--tpr-cc-bg);
  color: var(--tpr-cc-text);
  border-radius: var(--tpr-cc-radius);
  box-shadow: var(--tpr-cc-shadow);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.tpr-cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--tpr-cc-border);
}

.tpr-cc-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--tpr-cc-primary);
}

.tpr-cc-modal__close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--tpr-cc-muted);
  padding: 4px 8px;
  border-radius: 6px;
}
.tpr-cc-modal__close:hover { background: rgba(0, 0, 0, 0.06); }

.tpr-cc-modal__body {
  padding: 8px 24px 16px;
}

.tpr-cc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--tpr-cc-border);
}
.tpr-cc-row:last-child { border-bottom: none; }

.tpr-cc-row__text { flex: 1 1 auto; }

.tpr-cc-row__label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--tpr-cc-primary);
}

.tpr-cc-row__desc {
  margin: 0;
  font-size: 13px;
  color: var(--tpr-cc-muted);
  line-height: 1.4;
}

.tpr-cc-toggle__lock {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #a33;
}

.tpr-cc-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--tpr-cc-border);
}

/* Switch toggle */
.tpr-cc-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
}

.tpr-cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.tpr-cc-switch input:disabled { cursor: not-allowed; }

.tpr-cc-switch__track {
  position: absolute;
  inset: 0;
  background: #cfc6b4;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.tpr-cc-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.tpr-cc-switch input:checked ~ .tpr-cc-switch__track {
  background: var(--tpr-cc-primary);
}

.tpr-cc-switch input:checked ~ .tpr-cc-switch__track .tpr-cc-switch__thumb {
  transform: translateX(18px);
}

@media (max-width: 640px) {
  .tpr-cc-banner__content {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .tpr-cc-banner__actions {
    flex-direction: column;
  }
  .tpr-cc-banner__actions .tpr-cc-btn {
    width: 100%;
    text-align: center;
  }
}
