/* === BACKDROP OVERLAY === */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  font-family: "Inter", sans-serif;
  color: #4b5563;
  padding-bottom: 10px;
}

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

.cm-modal {
  background-color: #ffffff;
  border-radius: 5px;
  padding: 1.5rem;
  max-width: 100%;
  width: 90%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  position: relative;
  color: #4b5563;
  font-family: "Google Sans", "Roboto", sans-serif;
}

/* === MODAL HEADER === */
.cm-header h1.title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #4b5563;
  font-family: "Google Sans", "Roboto", sans-serif;
}

.cm-header p {
  font-size: 0.95rem;
  color: #4b5563;
}

.cm-header p a {
  color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
  text-decoration: underline;
}

.cm-header p a:hover {
  color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}

/* === PURPOSES & SERVICES LIST === */
.cm-purpose {
  display: flex;
  flex-wrap: wrap; /* enable wrapping */
  gap: 5px;
  align-items: center;
}

.cm-purpose > :nth-child(3) {
  flex-basis: 100%; /* full width forces line break */
}

.cm-purposes,
.cm-services {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  color: #4b5563;
}

.cm-purpose,
.cm-service {
  /* padding: 0.75rem 1rem; */
  /* border: 1px solid #e5e7eb; */
  /* border-radius: 0.5rem; */
  /* background-color: #f9fafb; */
  /* margin-bottom: 0.75rem; */
  color: #4b5563;
  /* margin-right: 20px; */
}

.cm-service {
  display: none;
}

.cm-caret {
  display: none;
}

.cm-service > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  width: 100%;
  flex: 1;
}

.cm-service > div > :nth-child(3) {
  flex-basis: 100%; /* full width forces line break */
}

/* === Proper checkbox + label alignment === */
.cm-list-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #4b5563;
}

.cm-list-title {
  font-weight: 500;
  color: #4b5563;
  line-height: 1.2;
}

/* === Proper checkbox alignment === */
.cm-list-input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #4b5563;
  border-radius: 0.25rem;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  display: inline-block;
  position: relative;
  top: 0;
  margin: 0;
}

/* === Checkbox tick === */
.cm-list-input[type="checkbox"]:checked {
  background-color: #000;
  border-color: #000;
}

.cm-list-input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* === SLIDER SWITCH === */
.cm-switch {
  display: none;
}

.cm-switch .slider {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #d1d5db;
  border-radius: 9999px;
  transition: background-color 0.3s ease;
}

.cm-switch .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 9999px;
  transition: transform 0.3s ease;
}

.cm-switch .slider.active {
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}

.cm-switch .slider.active::before {
  transform: translateX(20px);
}

/* === CTA BUTTONS === */
.cm-footer {
  margin-top: 2rem;
  text-align: right;
}

.cm-footer-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cm-btn {
  border: none;
  border-radius: 30px;
  padding: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: small;
}

.cm-btn-accept-all,
.cm-btn-accept {
  background-color: rgb(94 123 255);
  color: white;
  width: 180px;
  font-size: small;
}

.cm-btn-accept-all:hover,
.cm-btn-accept:hover {
  background-color: rgb(94 123 255 / 0.9);
  width: 180px;
}

.cm-btn-decline {
  background-color: #e5e7eb;
  color: #111827;
  width: 180px;
  font-size: small;
}

.cm-btn-decline:hover {
  background-color: #d1d5db;
}

/* === POWERED BY === */
.cm-powered-by {
  margin-top: 1rem;
  font-size: 0.8rem;
  text-align: center;
  display: none;
}

.cm-powered-by a {
  color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
  text-decoration: underline;
}
.cm-powered-by a:hover {
  color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}

/* === PURPOSE TEXT FIX === */
.purposes::first-letter {
  text-transform: uppercase;
}
