/* Custom Premium Cookie Banner - Trade Sync Design System */

#ts-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(3, 41, 83, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(3, 41, 83, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 24px;
  z-index: 999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1f2937;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

#ts-cookie-banner.ts-show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  #ts-cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    padding: 20px;
  }
}

#ts-cookie-banner h3 {
  font-size: 18px;
  font-weight: 700;
  color: #032953;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

#ts-cookie-banner p.ts-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #4b5563;
  margin: 0 0 20px 0;
}

#ts-cookie-banner a {
  color: #1FA3FF;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#ts-cookie-banner a:hover {
  text-decoration: underline;
  color: #0087e0;
}

/* Button Container */
.ts-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.ts-buttons-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 380px) {
  .ts-buttons-row {
    flex-direction: column;
  }
}

.ts-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  border: 1.5px solid transparent;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.ts-btn-accept {
  background: #032953;
  color: #ffffff;
}

.ts-btn-accept:hover {
  background: #1FA3FF;
  transform: translateY(-1px);
}

.ts-btn-reject {
  background: transparent;
  color: #4b5563;
  border-color: #d1d5db;
}

.ts-btn-reject:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #111827;
  border-color: #9ca3af;
}

.ts-btn-settings {
  background: transparent;
  color: #032953;
  border-color: transparent;
  padding: 8px 12px;
  font-size: 12px;
}

.ts-btn-settings:hover {
  color: #1FA3FF;
}

/* Customization Panel */
.ts-settings-panel {
  display: none;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-direction: column;
  gap: 14px;
}

.ts-settings-panel.ts-active {
  display: flex;
  animation: tsSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tsSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ts-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ts-toggle-label {
  display: flex;
  flex-direction: column;
}

.ts-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: #032953;
}

.ts-toggle-desc {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.4;
}

/* Toggle Switch Styling */
.ts-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.ts-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ts-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: .3s;
  border-radius: 20px;
}

.ts-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .ts-slider {
  background-color: #1FA3FF;
}

input:checked + .ts-slider:before {
  transform: translateX(18px);
}

input:disabled + .ts-slider {
  background-color: #cbd5e1;
  cursor: not-allowed;
}

/* Small footer link to reopen settings */
.ts-reopen-trigger {
  cursor: pointer;
}
