/*
 Consent Mode v2 — default banner styles
 - Minimal, unobtrusive styling intended as a sensible default.
 - Themes should override styles by targeting #cmv2-consent-banner, .cmv2-consent-banner, .cmv2-content, etc.
 - To disable the banner entirely, set option cmv2_options[banner_enabled] = 0 or use the cmv2_banner_enabled filter.
*/

#cmv2-consent-banner,
.cmv2-consent-banner {
  box-sizing: border-box;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(10, 10, 10, 0.9);
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmv2-hidden {
  display: none !important;
}

.cmv2-content {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  flex-direction: column;
}

.cmv2-text {
  flex: 1 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #111111;
  text-align: justify;
}

.cmv2-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cmv2-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  color: #111111;
  border: 1px solid #111111;
  border-radius: 0;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  -webkit-transition: all .3s ease;
  transition: all .3s ease;
}

.cmv2-btn:focus,
.cmv2-btn:hover {
  background: #111111;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.cmv2-accept {
  background: #111111;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.cmv2-accept:focus,
.cmv2-accept:hover {
  background: #20AD96;
  color: #ffffff;
  border: 1px solid #20AD96;
}

.cmv2-decline:focus,
.cmv2-decline:hover {
  background: #ad202e;
  color: #ffffff;
  border: 1px solid #ad202e;
}

/* Provide hook points for theme overrides:
   - #cmv2-consent-banner to change position/placement
   - .cmv2-content for layout
   - .cmv2-btn for button theming
   Example in theme CSS:
     #cmv2-consent-banner { bottom: auto; top: 0; background: rgba(255,255,255,0.98); color: #000; }
*/

/* Fallback Manage modal styles and banner popup (can be overridden by theme)
   - Banner can be shown as a full-width bottom bar (default) or as a focused popup
     when the .cmv2-popup class is added to the banner element by banner.js.
   - Backdrop and no-scroll classes are used to draw attention to the popup.
   - Themes may override by targeting .cmv2-manage-modal, .cmv2-manage-backdrop,
     .cmv2-banner-backdrop, .cmv2-popup, or .cmv2-no-scroll.
*/

/* Backdrop shown when banner is presented as popup */
.cmv2-banner-backdrop {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99998;
  display: none;
}

/* When banner becomes a popup, center it and restrict width */
#cmv2-consent-banner.cmv2-popup,
.cmv2-consent-banner.cmv2-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  right: auto;
  bottom: auto;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  background: #ffffff;
  color: #111;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  z-index: 100000;
}

/* Prevent body scroll while popup is visible */
.cmv2-no-scroll {
  overflow: hidden !important;
}

/* Manage modal/backdrop (fallback UI) */
.cmv2-manage-backdrop {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99999;
  display: none;
}

.cmv2-manage-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000;
  background: #ffffff;
  color: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  font-family: inherit;
  display: none;
}

.cmv2-manage-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
}

.cmv2-manage-field {
  margin: 8px 0;
}

.cmv2-manage-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmv2-manage-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.cmv2-manage-label input[type='checkbox']:before{
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  -webkit-transition: border-color .3s ease;
  transition: border-color .3s ease;
}

.cmv2-manage-label input[type='checkbox']:checked:before,
.cmv2-manage-label input[type='checkbox']:hover:before,
.cmv2-manage-label input[type='radio']:checked:before,
.cmv2-manage-label input[type='radio']:hover:before{
  border-color: #20AD96;
}

.cmv2-manage-label input[type='checkbox']:after{
  content: '';
    display: block;
    width: 8px;
    height: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    background: #111;
    border-radius: 0;
    z-index: 2;
    -webkit-transform: translate(-50%, -50%) scale(0);
    -ms-transform: translate(-50%, -50%) scale(0);
    transform: translate(-50%, -50%) scale(0);
    -webkit-transition: -webkit-transform .3s ease;
    transition: -webkit-transform .3s ease;
    transition: transform .3s ease;
    transition: transform .3s ease,
    -webkit-transform .3s ease;
}

.cmv2-manage-label input[type='checkbox']:after,
.cmv2-manage-label input[type='radio']:after{
  background-color: #20AD96;
}

/* Responsive */
@media (max-width: 640px) {
  .cmv2-manage-modal {
    width: 95%;
    padding: 12px;
  }
  .cmv2-manage-controls {
    justify-content: flex-end;
  }
  .cmv2-content {
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .cmv2-text {
    order: 0;
    width: 100%;
    margin-bottom: 8px;
  }
  .cmv2-actions {
    justify-content: flex-end;
    width: 100%;
  }
  .cmv2-manage-controls {
    justify-content: flex-end;
  }
}

@media (max-width: 450px){
  #cmv2-consent-banner.cmv2-popup,
  .cmv2-consent-banner.cmv2-popup {
    width: 95%;
    overflow: auto;
  }
  .cmv2-text{
    text-align: center;
  }
  .cmv2-btn{
    width: 100%;
  }
}
