/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  top: 0;
  left: 50%;
  -webkit-transform: translate(-50%, -300px);
          transform: translate(-50%, -300px);
  opacity: 0;
  max-width: 1000px;
  width: 90%;
  padding: 50px 25px 20px 25px;
  z-index: 10000;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  -webkit-box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.16);
          box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.16);
  vertical-align: center;
  text-align: center;
}

.cookie-banner.no-cookie {
  -webkit-animation: .5s forwards bounce-in-top;
          animation: .5s forwards bounce-in-top;
  -webkit-animation-delay: .5s;
          animation-delay: .5s;
  opacity: 1;
}

.cookie-banner__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 0;
}

.cookie-banner__text-panel .inline-paragraph {
  margin-bottom: 10px;
  font-size: 0.77778rem;
}

.cookie-banner__actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -ms-flex-item-align: center;
      align-self: center;
  gap: 10px;
  margin-top: 15px;
}

.cookie-banner__actions .button {
  /*min-width: 140px;*/
}

@media (min-width: 780px) {
  .cookie-banner {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner__text-panel .inline-paragraph {
    margin-bottom: 0;
  }
  
  .cookie-banner__actions {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin-top: 15px;
    margin-left: 0;
    gap: 10px;
  }
  
  .cookie-banner__actions .button {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    max-width: 200px;
  }
}

/* Cookie Settings Modal */
.cookie-settings__description {
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #666;
}

.cookie-category {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.cookie-category__header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 8px;
}

.cookie-category__title {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

.cookie-category__status {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.cookie-category__status--required {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.cookie-category__content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

.cookie-category__description {
  text-align: left;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0;
  margin-top: 0;
  line-height: 1.5;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

.cookie-category__toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  -ms-flex-item-align: start;
      align-self: flex-start;
}

.cookie-category__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #2196F3;
}

input:focus + .toggle-slider {
  -webkit-box-shadow: 0 0 1px #2196F3;
          box-shadow: 0 0 1px #2196F3;
}

input:checked + .toggle-slider:before {
  -webkit-transform: translateX(22px);
      -ms-transform: translateX(22px);
          transform: translateX(22px);
}

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

input:disabled + .toggle-slider:before {
  background-color: #fff;
}

/* Modal customizations for cookie settings */
#cookieSettingsModal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

#cookieSettingsModal .modal-header {
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 12px 12px 0 0;
  padding: 20px 20px 15px;
}

#cookieSettingsModal .modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

#cookieSettingsModal .modal-body {
  padding: 25px 20px;
}

#cookieSettingsModal .modal-footer {
  border-top: 1px solid #e0e0e0;
  padding: 15px 20px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#cookieSettingsModal .modal-footer .button {
  min-width: 120px;
}

@media (max-width: 767px) {
  #cookieSettingsModal .modal-footer {
    flex-direction: column-reverse;
  }
  
  #cookieSettingsModal .modal-footer .button {
    width: 100%;
  }
}

/* Animation for banner */
@keyframes bounce-in-top {
  0% {
    transform: translate(-50%, -300px);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, 10px);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Cookie Details Section */
.cookie-details {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 12px 15px;
  margin: 12px 0;
  font-size: 0.85rem;
}

.cookie-details__toggle {
  width: 100%;
  background: none;
  border: none;
  color: #2196F3;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 5px;
  -webkit-transition: color 0.2s;
  transition: color 0.2s;
}

.cookie-details__toggle:hover {
  color: #1976D2;
}

.cookie-details__toggle-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #2196F3;
  -webkit-transition: -webkit-transform 0.3s;
  transition: -webkit-transform 0.3s;
  transition: transform 0.3s;
  transition: transform 0.3s, -webkit-transform 0.3s;
}

.cookie-details__toggle.active .cookie-details__toggle-icon {
  -webkit-transform: rotate(180deg);
      -ms-transform: rotate(180deg);
          transform: rotate(180deg);
}

.cookie-details__content {
  display: none;
}

.cookie-details__content.active {
  display: block;
}

.cookie-details__title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.8rem;
  text-transform: uppercase;
  text-align: left;
}

.cookie-details__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cookie-details__item {
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 4px;
}

.cookie-details__item:last-child {
  border-bottom: none;
}

.cookie-details__name {
  font-family: monospace;
  background-color: #e8e8e8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #333;
  display: inline-block;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}

.cookie-details__purpose {
  color: #666;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-left: 0;
}

@media (min-width: 780px) {
  .cookie-details__item {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: baseline;
        -ms-flex-align: baseline;
            align-items: baseline;
    gap: 10px;
  }
  
  .cookie-details__name {
    min-width: 100px;
  }
}

/* Mobile responsive - keep toggle on right */
@media (max-width: 767px) {
  .cookie-category__content {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    gap: 10px;
  }
  
  .cookie-category__description {
    min-width: 0;
  }
  
  .cookie-category__toggle {
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }
}

/* Blur page content until cookie consent is given */
body.cookie-consent-active #page-main,
body.cookie-consent-active .page {
  -webkit-filter: blur(5px);
          filter: blur(5px);
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

/* Prevent scrolling when consent is not given */
body.cookie-consent-active {
  overflow: hidden;
}
  
  .cookie-category__description {
    min-width: 0;
  }
  
  .cookie-category__toggle {
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }
}

/* Cookie Consent Overlay */
.cookie-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9999;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Blur main content when overlay is active */
body.cookie-consent-active #page-main,
body.cookie-consent-active .page {
  -webkit-filter: blur(2px);
          filter: blur(2px);
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

/* Prevent scrolling when overlay is active */
body.cookie-consent-active {
  overflow: hidden;
}

.cart-button-cookie-consent-active {
  -webkit-filter: blur(2px);
  filter: blur(2px);
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

  .cookie-category__toggle {
    -ms-flex-item-align: start;
        align-self: flex-start;
  }
}
