/**
 * Custom Cookie Consent Styling for PrimeXM
 * Matches PrimeXM brand colors and design system
 */

:root {
  --cc-font-family: 'Mulish', 'Roboto', Arial, sans-serif;

  /* PrimeXM Brand Colors */
  --cc-bg: #ffffff;
  --cc-primary-color: #4169E1;
  --cc-secondary-color: #005F90;
  --cc-text-color: #595959;
  --cc-btn-primary-bg: linear-gradient(90deg, #005F90 0%, #007AB8 100%);
  --cc-btn-primary-hover-bg: linear-gradient(90deg, #004770 0%, #005F90 100%);
  --cc-btn-secondary-bg: #f5f5f5;
  --cc-btn-secondary-hover-bg: #e0e0e0;
  --cc-toggle-on-bg: #4169E1;
  --cc-toggle-off-bg: #ADADAD;
  --cc-cookie-category-block-bg: #f5f5f5;
  --cc-cookie-category-block-border: #EAEAEA;
  --cc-separator-border-color: #EAEAEA;
  --cc-overlay-bg: rgba(16, 16, 16, 0.85);
  --cc-modal-border-radius: 10px;
  --cc-btn-border-radius: 30px;
}

/* Consent Modal */
#cc-main #cm {
  font-family: var(--cc-font-family);
  max-width: 450px;
  border-radius: var(--cc-modal-border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#cc-main #cm .cm__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--cc-secondary-color);
  margin-bottom: 12px;
}

#cc-main #cm .cm__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cc-text-color);
}

#cc-main #cm .cm__desc a {
  color: var(--cc-primary-color);
  text-decoration: underline;
  font-weight: 600;
}

#cc-main #cm .cm__desc a:hover {
  color: var(--cc-secondary-color);
}

/* Buttons */
#cc-main .cm__btn,
#cc-main .pm__btn {
  font-family: var(--cc-font-family);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--cc-btn-border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
}

/* Primary button (Accept all) */
#cc-main .cm__btn--primary,
#cc-main .pm__btn--primary {
  background: var(--cc-btn-primary-bg);
  color: white;
}

#cc-main .cm__btn--primary:hover,
#cc-main .pm__btn--primary:hover {
  background: var(--cc-btn-primary-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 95, 144, 0.3);
}

/* Secondary button (Reject all/Manage preferences) */
#cc-main .cm__btn--secondary,
#cc-main .pm__btn--secondary {
  background: var(--cc-btn-secondary-bg);
  color: var(--cc-text-color);
  border: 2px solid #EAEAEA;
}

#cc-main .cm__btn--secondary:hover,
#cc-main .pm__btn--secondary:hover {
  background: var(--cc-btn-secondary-hover-bg);
  border-color: #ADADAD;
}

/* Preferences Modal */
#cc-main #s-ttl {
  font-size: 24px;
  font-weight: 700;
  color: var(--cc-secondary-color);
}

#cc-main .pm {
  font-family: var(--cc-font-family);
  max-width: 600px;
  max-height: 85vh;
  border-radius: var(--cc-modal-border-radius);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#cc-main .pm__section {
  margin-bottom: 24px;
}

#cc-main .pm__section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cc-secondary-color);
  margin-bottom: 8px;
}

#cc-main .pm__section-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cc-text-color);
}

#cc-main .pm__section-desc a {
  color: var(--cc-primary-color);
  text-decoration: underline;
  font-weight: 600;
}

#cc-main .pm__section-desc a:hover {
  color: var(--cc-secondary-color);
}

/* Toggle switch */
#cc-main .section__toggle {
  border-radius: 20px;
}

#cc-main .section__toggle.toggle--on {
  background: var(--cc-toggle-on-bg);
}

#cc-main .section__toggle.toggle--off {
  background: var(--cc-toggle-off-bg);
}

#cc-main .section__toggle-thumb {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Badge (Always Enabled) */
#cc-main .pm__badge {
  background: var(--cc-btn-primary-bg);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cookie table */
#cc-main .cookie-table {
  font-size: 13px;
  margin-top: 12px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--cc-cookie-category-block-border);
}

#cc-main .cookie-table th {
  background: var(--cc-cookie-category-block-bg);
  font-weight: 700;
  color: var(--cc-secondary-color);
  padding: 10px;
  text-align: left;
}

#cc-main .cookie-table td {
  padding: 10px;
  border-top: 1px solid var(--cc-cookie-category-block-border);
}

/* Close button */
#cc-main #s-c-bn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cc-btn-secondary-bg);
  transition: all 0.3s ease;
}

#cc-main #s-c-bn:hover {
  background: var(--cc-btn-secondary-hover-bg);
  transform: rotate(90deg);
}

/* Footer link */
#cc-main .cm__footer a {
  color: var(--cc-primary-color);
  font-size: 13px;
  text-decoration: underline;
  font-weight: 600;
}

#cc-main .cm__footer a:hover {
  color: var(--cc-secondary-color);
}

/* Overlay */
#cc-main #cm-ov,
#cc-main #cs-ov {
  background: var(--cc-overlay-bg);
  backdrop-filter: blur(2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #cc-main #cm {
    max-width: 90%;
    margin: 20px;
  }

  #cc-main .pm {
    max-width: 95%;
    max-height: 90vh;
  }

  #cc-main .cm__btn,
  #cc-main .pm__btn {
    font-size: 13px;
    padding: 10px 20px;
  }

  #cc-main .cm__title {
    font-size: 18px;
  }

  #cc-main #s-ttl {
    font-size: 20px;
  }
}

/* Accessibility improvements */
#cc-main .cm__btn:focus,
#cc-main .pm__btn:focus,
#cc-main #s-c-bn:focus {
  outline: 3px solid var(--cc-primary-color);
  outline-offset: 2px;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cc-main #cm {
  animation: fadeIn 0.4s ease-out;
}

#cc-main .pm {
  animation: fadeIn 0.3s ease-out;
}

/* Cookie preferences trigger button (if you want to add one in footer) */
.cookie-preferences-link {
  color: var(--cc-primary-color);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--cc-font-family);
}

.cookie-preferences-link:hover {
  color: var(--cc-secondary-color);
}
