:root{
  --tmrgpd-bg:#111827;
  --tmrgpd-fg:#ffffff;
  --tmrgpd-muted:#cbd5e1;
  --tmrgpd-border:rgba(255,255,255,.12);
  --tmrgpd-btn:#ffffff;
  --tmrgpd-btn-fg:#111827;
  --tmrgpd-danger:#ef4444;
}

.tmrgpd-banner{
  position:fixed;
  left:16px; right:16px;
  z-index:999999;
  background:var(--tmrgpd-bg);
  color:var(--tmrgpd-fg);
  border:1px solid var(--tmrgpd-border);
  border-radius:14px;
  padding:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
}
.tmrgpd-bottom{ bottom:16px; }
.tmrgpd-top{ top:16px; }

.tmrgpd-left{ flex:1; min-width:240px; }
.tmrgpd-title{ font-weight:700; margin-bottom:6px; font-size:15px; }
.tmrgpd-text{ font-size:13px; line-height:1.4; color:var(--tmrgpd-muted); }
.tmrgpd-links{ margin-top:10px; display:flex; flex-wrap:wrap; gap:10px; }
.tmrgpd-links a{ color:#93c5fd; font-size:12px; text-decoration:none; }
.tmrgpd-links a:hover{ text-decoration:underline; }

.tmrgpd-right{ display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.tmrgpd-btn{
  border:0;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:600;
  font-size:13px;
}
.tmrgpd-accept{ background:var(--tmrgpd-btn); color:var(--tmrgpd-btn-fg); }
.tmrgpd-reject{ background:transparent; color:var(--tmrgpd-fg); border:1px solid var(--tmrgpd-border); }
.tmrgpd-customize{ background:transparent; color:var(--tmrgpd-fg); border:1px solid var(--tmrgpd-border); }

.tmrgpd-modal{
  position:fixed;
  inset:0;
  z-index:1000000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,.55);
  overflow-y:auto;
}
.tmrgpd-modal.tmrgpd-open{ display:flex; }

.tmrgpd-modal-box{
  width:min(680px, 100%);
  background:#0b1220;
  color:#fff;
  border-radius:16px;
  border:1px solid var(--tmrgpd-border);
  box-shadow:0 24px 70px rgba(0,0,0,.35);
  padding:18px;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
}
.tmrgpd-modal-title{ font-weight:800; font-size:17px; line-height:1.2; margin-bottom:12px; }

.tmrgpd-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:12px;
  border:1px solid var(--tmrgpd-border);
  border-radius:14px;
  margin-bottom:10px;
}
.tmrgpd-row-head{ flex:1; }
.tmrgpd-desc{ margin-top:6px; font-size:12px; line-height:1.5; color:var(--tmrgpd-muted); }
.tmrgpd-toggle{ display:flex; align-items:center; gap:10px; min-width:120px; justify-content:flex-end; padding-top:2px; }
.tmrgpd-lock{ font-weight:800; padding:6px 10px; border-radius:999px; background:rgba(34,197,94,.15); color:#86efac; border:1px solid rgba(34,197,94,.35); font-size:12px; }

.tmrgpd-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}
.tmrgpd-save{ background:var(--tmrgpd-btn); color:var(--tmrgpd-btn-fg); }
.tmrgpd-close{ background:transparent; color:var(--tmrgpd-fg); border:1px solid var(--tmrgpd-border); }

.tmrgpd-manage{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:999998;
  background:#0b1220;
  color:#fff;
  border:1px solid var(--tmrgpd-border);
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  font-size:12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  line-height:1;
}
.tmrgpd-manage:hover{ filter:brightness(1.05); }
.tmrgpd-manage-icon{
  width:18px;
  height:18px;
  display:inline-block;
  flex:0 0 18px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 5.5c0-1.2.8-2.2 2-2.4a2.5 2.5 0 0 1 5 0c1.2.2 2 1.2 2 2.4h-9Z' fill='%23fff' opacity='.92'/%3E%3Cpath d='M6.8 7h10.4c1.4 0 2.6 1.2 2.6 2.6v5.7c0 3.3-2.7 6-6 6H10c-3.3 0-6-2.7-6-6V9.6C4 8.2 5.2 7 6.8 7Z' fill='%23fff' opacity='.92'/%3E%3Ccircle cx='9' cy='11' r='1' fill='%230b1220'/%3E%3Ccircle cx='13' cy='14' r='1' fill='%230b1220'/%3E%3Ccircle cx='16' cy='10.5' r='1' fill='%230b1220'/%3E%3C/svg%3E");
}
.tmrgpd-manage-label{ white-space:nowrap; }

.tmrgpd-hidden{ display:none !important; }

/* Switch */
.tmrgpd-toggle input[type="checkbox"]{ position:absolute; opacity:0; }
.tmrgpd-switch{
  width:44px; height:26px;
  display:inline-flex;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid var(--tmrgpd-border);
  padding:2px;
  cursor:pointer;
  align-items:center;
}
.tmrgpd-switch span{
  width:22px; height:22px;
  border-radius:999px;
  background:#fff;
  transform:translateX(0);
  transition:transform .15s ease;
}
.tmrgpd-toggle input[type="checkbox"]:checked + .tmrgpd-switch{
  background:rgba(34,197,94,.25);
  border-color:rgba(34,197,94,.35);
}
.tmrgpd-toggle input[type="checkbox"]:checked + .tmrgpd-switch span{
  transform:translateX(18px);
}

/* Mobile */
@media (max-width: 640px){
  .tmrgpd-banner{ flex-direction:column; }
  .tmrgpd-right{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }
  .tmrgpd-btn{ width:auto; }
  .tmrgpd-customize{ grid-column:1 / -1; }
  .tmrgpd-manage{ right:12px; bottom:12px; }
  .tmrgpd-modal{ align-items:flex-start; }
  .tmrgpd-modal-box{
    width:100%;
    max-height:calc(100vh - 24px);
    max-height:calc(100dvh - 24px);
    padding:16px;
    border-radius:18px;
  }
  .tmrgpd-row{
    flex-direction:column;
  }
  .tmrgpd-toggle{
    width:100%;
    min-width:0;
    justify-content:flex-end;
  }
  .tmrgpd-manage{
    width:48px;
    height:48px;
    padding:0;
    justify-content:center;
    background:transparent;
    border:0;
    box-shadow:none;
  }
  .tmrgpd-manage-label{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0, 0, 0, 0);
    white-space:nowrap;
    border:0;
  }
}


.tmrgpd-modal-links{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.tmrgpd-modal-links a{
  color:#93c5fd;
  font-size:12px;
  text-decoration:none;
}
.tmrgpd-modal-links a:hover{ text-decoration:underline; }
