@charset "utf-8";

/* Modal container */

div#cookie-modal-container {
  display: none;
  box-sizing: border-box;
}

/* Overlay */

.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

/* Modal component */

.cookie-modal_component {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  display: block;
  width: 100%;
  max-width: 760px;
  max-height: 90dvh;
  overflow-y: auto;
  font-family: Arial, sans-serif;
  font-size: 16px;
  background: #fff;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-modal_component * {
  font-family: Arial, sans-serif !important;
}

/* Content styles */

.cookie-edit-wrap {
  margin: 1rem 0;
}

.cookie-modal_content-wrap {
  padding: 2.5rem;
}

.cookie-modal_content-wrap p {
  text-wrap: pretty;
}

.cookie-modal_title {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #2b2b2b;
}

.cookie-modal_description {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #333;
}

.cookie-modal_link,
.cookie-edit_link {
  display: inline-flex;
  font-size: 1rem;
  color: #06c;
  text-decoration: underline;
  transition: color 0.2s ease;
  align-items: center;
}

.cookie-modal_link:hover,
.cookie-modal_link:focus,
.cookie-edit_link:hover,
.cookie-edit_link:focus {
  color: #049;
}

.cookie-modal_link svg,
.cookie-edit_link svg {
  margin-left: 0.4rem;
}

/* Form styles */

.cookie-modal_form {
  display: flex;
  border-radius: 6px;
  flex-direction: column;
}

.cookie-modal_checkbox-wrap {
  display: flex;
  height: auto;
  padding: 1rem 1.25rem 0.25rem 1.25rem;
  overflow: hidden;
  background: #f8f8f8;
  border-radius: 0.6rem;
  transition: height 0.5s ease;
  flex-direction: column;
  gap: 0.75rem;
}

.help-wrap {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.help-toggle {
  display: inline-block;
  padding: 0.5rem;
  margin-left: 1.5rem;
  cursor: pointer;
}

.collapsible-help {
  height: 0;
  overflow: hidden;
  transition: height 0.5s ease;
}

.collapsible-help p {
  line-height: 1.35;
}

.collapsible-help p:first-of-type {
  margin-top: 0;
}

.cookie-modal_option {
  font-size: 1rem;
  cursor: pointer;
}

.cookie-help-text {
  margin: 0.5rem 0;
}

.cookie-modal_option:first-of-type {
  border-top-right-radius: 6px;
  border-top-left-radius: 6px;
}

.cookie-modal_option:hover,
.cookie-modal_option:focus {
  background: #f0f0f0;
}

.cookie-modal_option.is-not-allowed {
  cursor: not-allowed;
}

.cookie-modal_option input[type='checkbox'] {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: bottom;
  background: #f8f8f8;
  border: 2px solid #ccc;
  border-radius: 4px;
}

.cookie-modal_option input[type='checkbox']:checked {
  background: #007aff;
}

.cookie-modal_option span:focus,
.cookie-modal_option input[type='checkbox']:focus + span {
  outline: none;
}

.cookie-modal_option span {
  font-weight: 600;
  color: #2b2b2b;
  vertical-align: bottom;
}

.cookie-modal_option p {
  margin: 1rem 0 0;
  font-weight: 400;
  line-height: 1.35;
  color: #000;
}

/* Button styles */

.cookie-modal_button-wrap {
  display: flex;
  padding: 1rem 0 0 0;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-modal_button {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background-color: #000;
  border-radius: 0.6rem;
  transition: all 0.2s ease;
  flex: 1;
}

.cookie-modal_button:hover {
  color: #fff;
  background-color: #333;
}

/* Accessibility */

.screenreader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Focus styles for accessibility */

.cookie-modal_link:focus,
.cookie-edit_link:focus,
.cookie-modal_button:focus,
.cookie-modal_closebutton:focus,
input[type='checkbox']:focus + span {
  outline: 3px solid #007aff;
  outline-offset: 2px;
}

/* Responsive styles */

@media (max-width: 768px) {
  .cookie-modal_component {
    width: 90dvw;
    max-width: none;
    margin: auto;
    overflow-x: hidden;
  }

  .cookie-modal_content-wrap {
    padding: 1.25rem;
  }

  .cookie-modal_button-wrap {
    padding-top: 1.25rem;
    flex-direction: column;
  }

  .cookie-modal_button {
    width: auto;
  }

  .help-toggle {
    margin-left: 0;
  }
}
