/**
 * Custom Cookie Consent Styles
 * Built for Root
 */

/* ========== BANNER ========== */

#cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#cookie-consent-banner.cc-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cc-banner {
  background: #0d1926;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cc-banner-content {
  margin-bottom: 20px;
}

.cc-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.cc-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.cc-banner-actions {
  display: flex;
  gap: 10px;
}

.cc-banner-actions .cc-btn {
  flex: 1;
}

.cc-banner-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.cc-link-btn {
  background: none;
  border: none;
  color: #3B6AF8;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  line-height: 1;
}

.cc-link-btn:hover {
  color: #5a85ff;
}

.cc-link-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.cc-privacy-link {
  color: #3B6AF8;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1;
}

.cc-privacy-link:hover {
  color: #5a85ff;
}

/* ========== BUTTONS ========== */

.cc-btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.cc-btn-primary {
  background: #3B6AF8;
  color: #ffffff;
}

.cc-btn-primary:hover {
  background: #5a85ff;
}

.cc-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ========== MODAL ========== */

#cookie-consent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#cookie-consent-modal.cc-visible {
  opacity: 1;
  visibility: visible;
}

.cc-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 16, 27, 0.9);
}

.cc-modal {
  position: relative;
  background: #0d1926;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#cookie-consent-modal.cc-visible .cc-modal {
  transform: scale(1);
}

/* Modal Header */
.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-modal-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.cc-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s ease;
}

.cc-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Modal Body */
.cc-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cc-section {
  margin-bottom: 16px;
}

.cc-section:last-child {
  margin-bottom: 0;
}

.cc-section-intro {
  margin-bottom: 24px;
}

.cc-section-intro p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.cc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 20px;
}

.cc-section-info {
  flex: 1;
}

.cc-section-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 4px 0;
}

.cc-section-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

/* ========== TOGGLE SWITCH ========== */

.cc-toggle {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-track {
  width: 52px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cc-toggle:hover .cc-toggle-track {
  background: rgba(255, 255, 255, 0.22);
}

.cc-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

/* Toggle ON state */
.cc-toggle input:checked + .cc-toggle-track,
.cc-toggle-track.cc-toggle-on {
  background: #3B6AF8;
}

.cc-toggle:hover input:checked + .cc-toggle-track,
.cc-toggle-readonly:hover .cc-toggle-track.cc-toggle-on {
  background: #5a85ff;
}

.cc-toggle input:checked + .cc-toggle-track .cc-toggle-thumb,
.cc-toggle-track.cc-toggle-on .cc-toggle-thumb {
  transform: translateX(24px);
}

/* Readonly toggle (for necessary) */
.cc-toggle-readonly .cc-toggle-track {
  cursor: not-allowed;
  opacity: 0.7;
}

.cc-toggle-readonly:hover .cc-toggle-track.cc-toggle-on {
  background: #3B6AF8;
}

/* Modal Footer */
.cc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.cc-modal-footer-left {
  display: flex;
  gap: 10px;
}

/* ========== MOBILE ========== */

@media (max-width: 640px) {
  #cookie-consent-banner {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .cc-banner {
    max-width: none;
    padding: 20px;
  }

  .cc-banner-actions {
    flex-direction: row;
  }

  .cc-banner-actions .cc-btn {
    flex: 1;
    text-align: center;
  }

  .cc-modal {
    width: 95%;
    max-height: 85vh;
  }

  .cc-modal-header {
    padding: 16px 20px;
  }

  .cc-modal-body {
    padding: 20px;
  }

  .cc-section-header {
    padding: 14px 16px;
  }

  .cc-modal-footer {
    flex-direction: column;
    padding: 16px 20px;
  }

  .cc-modal-footer-left {
    width: 100%;
    order: 2;
  }

  .cc-modal-footer-left .cc-btn {
    flex: 1;
  }

  #cc-modal-save {
    width: 100%;
    order: 1;
    margin-bottom: 8px;
  }
}
