/* TextLevel Cookie Consent Styles
   Neutral, clean — adapt to match your site's palette */

/* --- Banner --- */
#tl-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  color: #f5f5f5;
  border-top: 1px solid #333;
  padding: 16px 24px;
  font-family: inherit;
  font-size: 14px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
}

.tl-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.tl-consent-text {
  flex: 1;
  min-width: 240px;
}

.tl-consent-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.tl-consent-text p {
  margin: 0 0 6px;
  color: #ccc;
  line-height: 1.5;
}

.tl-consent-link {
  color: #aaa;
  font-size: 12px;
  text-underline-offset: 2px;
}

.tl-consent-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.tl-btn {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.tl-btn:hover { opacity: 0.85; }

.tl-btn-primary {
  background: #fff;
  color: #1a1a1a;
}

.tl-btn-secondary {
  background: transparent;
  color: #f5f5f5;
  border: 1px solid #555;
}

.tl-btn-ghost {
  background: transparent;
  color: #aaa;
  padding: 8px 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Modal --- */
#tl-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
}

.tl-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.tl-modal-box {
  position: relative;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 32px;
  max-width: 520px;
  width: calc(100% - 48px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 48px rgba(0,0,0,0.3);
}

.tl-modal-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.tl-modal-box > p {
  color: #555;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* --- Toggle rows --- */
.tl-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #eee;
}

.tl-toggle-row div { flex: 1; }

.tl-toggle-row strong {
  display: block;
  margin-bottom: 2px;
}

.tl-toggle-row p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

/* --- Toggle switch --- */
.tl-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tl-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tl-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
}

.tl-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);
}

.tl-toggle input:checked + .tl-slider { background: #2d7a4f; }
.tl-toggle input:checked + .tl-slider:before { transform: translateX(20px); }

.tl-toggle-disabled .tl-slider {
  cursor: not-allowed;
  opacity: 0.5;
}

/* --- Modal footer --- */
.tl-modal-actions {
  margin-top: 24px;
}

.tl-modal-actions .tl-btn-primary {
  background: #1a1a1a;
  color: #fff;
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.tl-consent-legal {
  margin: 16px 0 0;
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.5;
}

.tl-consent-legal a { color: #666; }

/* --- Mobile --- */
@media (max-width: 600px) {
  .tl-consent-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .tl-consent-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .tl-modal-box {
    padding: 24px;
  }
}