/* Trident Privacy Suite — Consent Banner Styles */

:root {
  --tps-primary: #0066CC;
  --tps-radius: 10px;
  --tps-shadow: 0 8px 32px rgba(0,0,0,0.18);
  --tps-font: -apple-system, 'Segoe UI', sans-serif;
  --tps-z: 999999;
}

/* ─── Banner Base ──────────────────────────── */
.tps-banner {
  position: fixed;
  z-index: var(--tps-z);
  font-family: var(--tps-font);
  font-size: 14px;
  line-height: 1.5;
  max-width: 100%;
  box-sizing: border-box;
  animation: tps-slide-in 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes tps-slide-in {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Positions */
.tps-banner--bottom { bottom: 0; left: 0; right: 0; }
.tps-banner--top    { top: 0; left: 0; right: 0; animation: tps-slide-down 0.35s ease both; }
@keyframes tps-slide-down { from { opacity:0; transform:translateY(-40px); } to { opacity:1; transform:translateY(0); } }
.tps-banner--modal  { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100vw - 32px); border-radius: var(--tps-radius); }

/* Dark theme */
.tps-banner--dark {
  background: #1a1a2e;
  color: #e8e8f0;
  border-top: 3px solid var(--tps-primary);
  box-shadow: var(--tps-shadow);
}
.tps-banner--dark .tps-link { color: #7eb3f5; }
.tps-banner--dark .tps-btn--ghost { color: #aaa; border-color: #444; }
.tps-banner--dark .tps-btn--outline { color: #ccc; border-color: #555; }
.tps-banner--dark .tps-cat { border-color: #2d2d4a; background: rgba(255,255,255,0.04); }
.tps-banner--dark .tps-cat__desc { color: #aaa; }
.tps-banner--dark .tps-cipa-notice { background: rgba(0,100,200,0.15); border-color: rgba(0,100,200,0.4); color: #9ec8f5; }
.tps-banner--dark .tps-do-not-sell-wrap { border-color: #2d2d4a; background: rgba(255,255,255,0.03); }

/* Light theme */
.tps-banner--light {
  background: #fff;
  color: #1a1a2e;
  border-top: 3px solid var(--tps-primary);
  box-shadow: var(--tps-shadow);
}
.tps-banner--light .tps-link { color: var(--tps-primary); }
.tps-banner--light .tps-btn--ghost { color: #555; border-color: #ccc; }
.tps-banner--light .tps-btn--outline { color: #333; border-color: #bbb; }
.tps-banner--light .tps-cat { border-color: #e8e8ee; background: #f9f9fc; }
.tps-banner--light .tps-cat__desc { color: #666; }
.tps-banner--light .tps-cipa-notice { background: #e8f0ff; border-color: #a0c0f0; color: #1a3a6e; }
.tps-banner--light .tps-do-not-sell-wrap { border-color: #e0e0e8; background: #fafafa; }

/* ─── Simple View ──────────────────────────── */
.tps-banner__simple {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.tps-banner__text { flex: 1; min-width: 260px; }
.tps-banner__text strong { display: block; font-size: 15px; margin-bottom: 3px; }
.tps-banner__text span { font-size: 13px; opacity: 0.85; }
.tps-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ─── Detail View ──────────────────────────── */
.tps-banner__detail { padding: 20px 24px; max-height: 85vh; overflow-y: auto; }
.tps-banner__detail-header h3 { margin: 0 0 4px; font-size: 17px; }
.tps-banner__detail-header p  { margin: 0 0 14px; font-size: 13px; opacity: 0.75; }
.tps-banner__cats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.tps-cat {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.tps-cat__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tps-cat__name   { font-weight: 600; font-size: 14px; }
.tps-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tps-icon-label i {
  width: 1em;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.tps-cat__always { font-size: 11px; opacity: 0.6; background: rgba(128,128,128,0.15); padding: 2px 8px; border-radius: 20px; }
.tps-cat__desc   { margin: 0; font-size: 12px; line-height: 1.4; }

/* Do Not Sell */
.tps-do-not-sell-wrap {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}
.tps-dns-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.tps-dns-toggle input { margin-top: 2px; accent-color: var(--tps-primary); width: 16px; height: 16px; }
.tps-dns-toggle span { font-weight: 600; font-size: 13px; }
.tps-do-not-sell-wrap .tps-cat__desc { margin-top: 6px; }

/* CIPA notice */
.tps-cipa-notice {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.tps-cipa-notice__title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Detail actions */
.tps-banner__detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(128,128,128,0.15);
}
.tps-sep { opacity: 0.4; }
.tps-detail-btns { margin-left: auto; display: flex; gap: 8px; }

/* ─── Buttons ──────────────────────────────── */
.tps-btn {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--tps-font);
  line-height: 1;
}
.tps-btn--primary {
  background: var(--tps-primary);
  color: #fff;
  border-color: var(--tps-primary);
}
.tps-btn--primary:hover { filter: brightness(1.12); }
.tps-btn--outline {
  background: transparent;
  border-color: currentColor;
}
.tps-btn--outline:hover { background: rgba(128,128,128,0.1); }
.tps-btn--ghost {
  background: transparent;
  border-color: transparent;
}
.tps-btn--ghost:hover { background: rgba(128,128,128,0.1); }

/* ─── Toggle Switch ────────────────────────── */
.tps-switch { position: relative; display: inline-block; cursor: pointer; }
.tps-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tps-switch__track {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #999;
  position: relative;
  transition: background 0.2s;
}
.tps-switch__track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 3px; left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.tps-switch input:checked + .tps-switch__track { background: var(--tps-primary); }
.tps-switch input:checked + .tps-switch__track::after { transform: translateX(18px); }
.tps-switch input:focus + .tps-switch__track { outline: 2px solid var(--tps-primary); outline-offset: 2px; }

/* ─── CCPA Footer Link ─────────────────────── */
.tps-dns-link {
  font-size: 12px;
  color: #888;
  text-decoration: underline;
  cursor: pointer;
}
.tps-dns-link:hover { color: var(--tps-primary); }

/* ─── Form Styles (Data Request Page) ─────── */
.tps-request-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--tps-font);
}
.tps-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  gap: 4px;
  margin-bottom: 14px;
}
.tps-form input[type=text],
.tps-form input[type=email],
.tps-form select,
.tps-form textarea {
  padding: 9px 12px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--tps-font);
  transition: border-color 0.15s;
}
.tps-form input:focus, .tps-form select:focus, .tps-form textarea:focus {
  border-color: var(--tps-primary);
  outline: none;
}
.tps-form span { color: #c00; }
.tps-form__row { display: flex; gap: 16px; }
.tps-form__row--2col > * { flex: 1; }
.tps-form__verify { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: normal; }
.tps-form__verify input { margin-top: 2px; accent-color: var(--tps-primary); }
.tps-notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.tps-notice--success { background: #e8f8ee; border: 1px solid #6dc98a; color: #1a5c30; }
.tps-notice--error   { background: #fce8e8; border: 1px solid #e57373; color: #7b1212; }

/* ─── Privacy Policy Page ──────────────────── */
.tps-privacy-policy h2 { margin-top: 2em; }
.tps-privacy-policy ul { padding-left: 1.4em; }

/* ─── Responsive ───────────────────────────── */
@media (max-width: 640px) {
  .tps-banner__simple { flex-direction: column; align-items: flex-start; }
  .tps-banner--modal  { width: 100%; top: auto; left: 0; right: 0; bottom: 0; transform: none; border-radius: var(--tps-radius) var(--tps-radius) 0 0; }
  .tps-banner__actions { width: 100%; }
  .tps-btn { flex: 1; text-align: center; }
  .tps-form__row { flex-direction: column; }
  .tps-detail-btns { width: 100%; }
}
