/**
 * Custom Consent Banner Styles
 * Overrides default consent-banner-js styles
 * Layout: Text (left) | Cookie Image + Buttons (right, stacked vertically)
 */

/* Main banner wrapper */
#consent-banner-main {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  z-index: 999999;
}
#consent-banner-modal .consent-banner-modal-wrapper h2 {
  display: none !important;
}
#consent-banner-modal .consent-banner-modal-wrapper p {
  margin-top: 0 !important;
  font-size: 15px !important;
}
/* Bar mode styling - Horizontal layout */
#consent-banner-modal.custom-layout-applied {
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px 40px !important;
  max-width: 588px;
  margin: 0 auto;
  border-radius: 8px !important;
}

#consent-banner-modal.custom-layout-applied .consent-banner-modal-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  margin: 0 !important;
  padding: 0 !important;
}
.consent-banner-bottom {
  display: flex;
  width: 100% !important;
  align-content: space-between;
  flex-wrap: wrap;
  gap: 8%;
}
.consent-banner-bottom img {
  max-width: 240px !important;
  margin: 0 !important;
}

/* Text content area - takes available space on the left */
#consent-banner-modal.custom-layout-applied
  .consent-banner-modal-wrapper
  > div:first-child,
#consent-banner-modal.custom-layout-applied .consent-banner-modal-wrapper > p {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hide title in bar mode */
#consent-banner-modal.custom-layout-applied .consent-banner-title {
  display: none;
}

/* Text styling */
#consent-banner-modal.custom-layout-applied .consent-banner-description,
#consent-banner-modal.custom-layout-applied .consent-banner-modal-wrapper > p {
  color: #333333;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 !important;
  text-align: left;
}

#consent-banner-modal.custom-layout-applied .consent-banner-description p {
  margin: 0 0 8px 0;
}

#consent-banner-modal.custom-layout-applied
  .consent-banner-description
  p:last-child {
  margin-bottom: 0;
}

/* Cookie section wrapper - right side with image and buttons stacked */
.cookie-section-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* min-width: 200px; */
  flex: 1;
  justify-content: center;
  padding-top: 20px !important;
}

/* Cookie image */
.cookie-consent-image {
  width: 80px;
  height: auto;
  display: block;
}

/* Buttons container - vertical stack */
#consent-banner-modal.custom-layout-applied .consent-banner-modal-buttons {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  margin: 0 !important;
  text-align: center;
  align-items: center !important;
}
a.consent-banner-button:not(.consent-banner-button[href="#accept"]) {
  width: fit-content !important;
}
.consent-banner-button[href="#accept"] {
  margin: 0 !important;
}
.consent-banner-button:not(.consent-banner-button[href="#accept"]) {
  opacity: 0.7 !important;
}
a.consent-banner-button:hover {
  text-decoration: none !important;
  opacity: 1 !important;
}

/* All buttons reset */
.consent-banner-button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  background: transparent;
  display: inline-block;
}

/* Primary button (Souhlasím) - Yellow/Orange */
#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#accept"] {
  background: var(--button_gradient_top_color);
  color: var(--button_accent_color);
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 400;
  font-size: 20px;
  width: 100%;
  text-align: center;
  order: 1;
}

#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#accept"]:hover {
  background: var(--button_gradient_top_color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

/* Secondary links (Nastavení cookies, Nesouhlasím) */
#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#settings"] {
  color: #666666;
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
  order: 2;
}

#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#reject"] {
  color: #666666;
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
  order: 3;
}

#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#settings"]:hover,
#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#reject"]:hover {
  color: #333333;
}

/* Settings modal styling */
#consent-banner-settings {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#consent-banner-settings .consent-banner-title {
  color: #333333;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

#consent-banner-settings .consent-banner-description {
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Consent types list */
.consent-banner-consent-types {
  margin: 24px 0;
}

.consent-banner-consent-type {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #fafafa;
}

.consent-banner-consent-type-title {
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
}

.consent-banner-consent-type-description {
  font-size: 13px;
  color: #666666;
  margin-bottom: 12px;
}

/* Toggle switch */
.consent-banner-toggle {
  display: inline-block;
  width: 50px;
  height: 26px;
  background: #cccccc;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.consent-banner-toggle.active {
  background: var(--button_gradient_top_color);
}

.consent-banner-toggle::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.consent-banner-toggle.active::after {
  transform: translateX(24px);
}

/* Settings modal buttons */
#consent-banner-settings .consent-banner-buttons,
#consent-banner-settings .consent-banner-settings-buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

#consent-banner-settings .consent-banner-button[href="#accept"],
#consent-banner-settings .consent-banner-button[href="#save"] {
  background: var(--button_gradient_top_color);
  color: #333333;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  width: auto;
}
#consent-banner-settings .consent-banner-button[href="#accept"]:hover,
#consent-banner-settings .consent-banner-button[href="#save"]:hover,
#consent-banner-modal.custom-layout-applied
  .consent-banner-button[href="#accept"]:hover {
  background: var(--button_gradient_top_color_hover);
  color: white;
}

#consent-banner-settings .consent-banner-button[href="#close"],
#consent-banner-settings .consent-banner-button[href="#reject"] {
  color: #666666;
  padding: 12px 24px;
  background: #dfdfdf;
}
#consent-banner-settings .consent-banner-button[href="#close"]:hover,
#consent-banner-settings .consent-banner-button[href="#reject"]:hover {
  background: #adadad;
}

/* Wall/overlay */
#consent-banner-wall {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

/* Responsive design */
@media (max-width: 768px) {
  #consent-banner-modal.custom-layout-applied {
    padding: 20px !important;
  }

  #consent-banner-modal.custom-layout-applied .consent-banner-modal-wrapper {
    flex-direction: column;
    /* gap: 20px; */
  }

  .cookie-section-wrapper {
    width: 100%;
  }

  .cookie-consent-image {
    width: 60px;
  }

  #consent-banner-settings {
    padding: 20px;
    margin: 20px;
  }
}
