/* 
  GOCARS Cookie Consent Manager
  Global wrapper elements are prefixed with "#gocars-" to avoid conflicts.
*/

/* --------------------------------
  Global Styles - These elements exist in the main DOM and styling is limited to positioning and animation
-------------------------------- */
/* Wrapper (Global) */
#gocars-wrapper {
    --focus: 0 0 0 2px #ffffff, 0 0 0 4px #000000, 0 0 0 6px #ffffff;
    --boxShadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
    --fontFamily: Helvetica Neue, Segoe UI, Arial, sans-serif;
    --primaryColor: var(--primary-color);
    --backgroundColor: #FFFFFF;
    --textColor: var(--text-color);
    --backdropBackgroundColor: #00000033;
    --backdropBackgroundBlur: 0px;
    --cookieIconColor: var(--primary-color);
    --cookieIconBackgroundColor: var(--primary-color);
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    border: 0px;
    display: flex;
    justify-content: center;
    align-items: center
  }
  
  /* Backdrop (Global) */
  #gocars-backdrop-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    border: 0px;
    display: none;
  }
  
  /* --------------------------------
    Links
  -------------------------------- */
  #gocars-wrapper a {
    all: unset;
    display: inline-block;
    color: var(--primaryColor);
    text-decoration: underline;
  }
  
  #gocars-wrapper a:hover {
    cursor: pointer;
    color: var(--textColor);
  }
  
  /* --------------------------------
    Focus Styles
  -------------------------------- */
  #gocars-wrapper a:focus,
  #gocars-wrapper #gocars-banner button:focus,
  #gocars-wrapper #gocars-modal button:focus,
  #gocars-wrapper #gocars-cookie-icon:focus {
    outline: none;
    /* box-shadow: var(--focus); */
    /* border-radius: 5px; */
  }
  
  #gocars-wrapper #gocars-cookie-icon:focus {
    border-radius: 50%;
  }
  
  /* --------------------------------
    General Styles
  -------------------------------- */
  
  #gocars-wrapper .st-button {
    color: var(--buttonTextColor, var(--backgroundColor));
    background-color: var(--primaryColor);
    border: 1px solid var(--primaryColor);
    padding: 10px 20px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    border-radius: 5px;
  }
  
  #gocars-wrapper .st-button--outline {
    background-color: transparent;
    color: var(--primaryColor);
    border-color: var(--primaryColor);
  }
  
  #gocars-wrapper .st-button--outline:hover {
    background-color: var(--primaryColorHover, var(--secondary-color, var(--primaryColor)));
    border-color: var(--primaryColorHover, var(--secondary-color, var(--primaryColor)));
    color: var(--buttonHoverTextColor, var(--backgroundColor));
  }
  
  #gocars-wrapper .st-button--primary:hover {
    background-color: var(--primaryColorHover, var(--secondary-color-dark, var(--primaryColor)));
    border-color: var(--primaryColorHover, var(--secondary-color-dark, var(--primaryColor)));
  }
  
  #gocars-wrapper .st-button--secondary {
    background-color: var(--backgroundColor);
    color: var(--primaryColor);
  }
  
  #gocars-wrapper .st-button--secondary:hover {
    background-color: var(--primaryColor);
    color: var(--backgroundColor);
  }
  
  /* --------------------------------
    Banner
  -------------------------------- */
  #gocars-banner {
    font-family: var(--fontFamily);
    color: var(--textColor);
    background-color: var(--backgroundColor);
    box-sizing: border-box;
    padding: 32px;
    /* border-radius: 5px; */
    pointer-events: auto;
    border: 0px;
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 600px;
    overflow: auto;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    transform: translate(0, -20px);
    opacity: 0;
    animation: gocars-slideInDown 350ms ease-out forwards;
    animation-delay: 0.3s;
    box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
  }
  
  #gocars-banner:focus {
    border-radius: 50%;
  }
  
  #gocars-banner.center {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    position: fixed;
    transform: translate(-50%, calc(-50% - 20px));
    animation: gocars-slideInDown-center 350ms ease-out forwards;
  }
  
  #gocars-banner.bottomLeft {
    bottom: 16px;
    left: 16px;
    position: fixed;
  }
  
  #gocars-banner.bottomCenter {
    bottom: 16px;
    left: 50%;
    position: fixed;
    transform: translate(-50%, -20px);
    animation: gocars-slideInDown-bottomCenter 350ms ease-out forwards;
  }
  
  /* #gocars-banner .preferences {
    display: flex;
    gap: 5px;
    border: none;
    padding: 15px 0px;
    background-color: transparent;
    color: var(--primaryColor);
    cursor: pointer;
    font-size: 16px;
  } */
  
  /* #gocars-banner .preferences span {
    display: block;
    white-space: nowrap;
    text-decoration: underline;
  }
  
  #gocars-banner .preferences span:hover {
    color: var(--textColor);
  } */
  
  /* #gocars-banner .preferences:after {
    display: block;
    content: '>';
    text-decoration: none;
  } */
  
  #gocars-banner p {
    font-size: 16px;
    line-height: 24px;
    margin: 0px 0px 15px;
  }
  
  #gocars-banner a {
    display: inline-block;
    color: var(--primaryColor);
    text-decoration: underline;
    background-color: var(--backgroundColor);
  }
  
  #gocars-banner a:hover {
    color: var(--textColor);
  }
  
  
  #gocars-banner .actions {
    display: flex;
    gap: 16px;
    flex-direction: column;
    margin-top: 24px;
  }
  
  @media (min-width: 600px) {
    #gocars-banner .actions {
      flex-direction: row;
      align-items: center;
    }
  }
  
  #gocars-banner .actions-row {
    display: flex;
    gap: 16px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
  }
  
  /* --------------------------------
    Modal
  -------------------------------- */
  #gocars-modal {
    display: none;
    pointer-events: auto;
    overflow: auto;
    width: 800px;
    max-width: 100%;
    max-height: 100%;
    border: 0px;
    transform: translate(0px, -20px);
    opacity: 0;
    animation: gocars-slideInUp-center 350ms ease-out forwards;
    box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
    font-family: var(--fontFamily);
    color: var(--textColor);
    flex-direction: column;
    padding: 30px;
    background-color: var(--backgroundColor);
    /* border-radius: 5px; */
    box-sizing: border-box;
  }
  
  /* --------------------------------
    Modal - Header
  -------------------------------- */
  #gocars-modal header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
  }
  
  #gocars-modal h1 {
    font-family: var(--fontFamily);
    color: var(--textColor);
    font-size: 24px;
    font-weight: 500;
    margin: 0px;
  }
  
  #gocars-modal .modal-close {
    display: inline-flex;
    border: none;
    padding: 13px;
    border: 0px;
    cursor: pointer;
    background: var(--backgroundColor);
    color: var(--primaryColor);
  }
  
  #gocars-modal .modal-close svg {
    fill: var(--primaryColor);
  }
  
  /* --------------------------------
    Modal - Content
  -------------------------------- */
  
  #gocars-modal section {
    flex: 1;
    margin-top: 32px;
  }
  
  #gocars-modal section::-webkit-scrollbar {
    display: block; /* Force scrollbars to show */
    width: 5px; /* Width of the scrollbar */
  }
  
  #gocars-modal section::-webkit-scrollbar-thumb {
    background-color: var(--textColor); /* Color of the scrollbar thumb */
    border-radius: 10px; /* Rounded corners for the thumb */
  }
  
  #gocars-modal p {
    font-size: 16px;
    line-height: 24px;
    color: var(--textColor);
    margin: 0px 0px 15px;
  }
  
  #gocars-modal p:last-of-type {
    margin: 0px;
  }
  
  #gocars-modal fieldset {
    padding: 0px;
    border: none;
    margin: 0px 0px 32px;
  }
  
  #gocars-modal fieldset:last-of-type {
    margin: 0px;
  }
  
  #gocars-modal legend {
    padding: 0px;
    margin: 0px 0px 10px;
    font-weight: 700;
    color: var(--textColor);
    font-size: 16px;
  }
  
  #gocars-modal .cookie-type-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;  
  }
  
  /* --------------------------------
    Modal - Switches
  -------------------------------- */
  #gocars-modal .switch {
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    height: 34px;
    width: 74px;
    cursor: pointer;
  }
  
  #gocars-modal .switch:focus-within {
    outline: none;
    /* box-shadow: var(--focus); */
    border-radius: 25px;
  }
  
  #gocars-modal .switch input {
    opacity: 0;
    position: absolute;
  }
  
  /* Unchecked Switch Styles */
  #gocars-modal .switch__pill {
    position: relative;
    display: block;
    height: 34px;
    width: 74px;
    /* background: var(--textColor); */
    background: #000;
    border-radius: 25px;
  }
  
  #gocars-modal .switch__dot {
    position: absolute;
    top: 2px;
    left: 2px;
    display: block;
    height: 30px;
    width: 30px;
    background: var(--backgroundColor);
    border-radius: 50%;
    transition: left 150ms ease-out;
  }
  
  #gocars-modal .switch__off,
  #gocars-modal .switch__on {
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 500;
    color: var(--backgroundColor);
    position: absolute;
    top: 7px;
    right: 8px;
    transition: right 150ms ease-out, opacity 150ms ease-out;
  }
  
  #gocars-modal .switch__off {
    opacity: 1;
  }
  
  #gocars-modal .switch__on {
    opacity: 0;
  }
  
  /* Checked Switch Styles */
  #gocars-modal .switch input:checked + .switch__pill {
    background: var(--primaryColor);
  }
  
  #gocars-modal .switch input:checked ~ .switch__dot {
    left: calc(100% - 32px);
  }
  
  #gocars-modal .switch input:checked ~ .switch__off {
    right: calc(100% - 32px);
    opacity: 0;
  }
  
  #gocars-modal .switch input:checked ~ .switch__on {
    right: calc(100% - 34px);
    opacity: 1;
  }
  
  /* Disabled Switch Styles */
  #gocars-modal .switch input:disabled + .switch__pill {
    opacity: 0.65;
    cursor: not-allowed;
  }
  
  /* --------------------------------
    Modal - Footer
  -------------------------------- */
  #gocars-modal footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
  }
  
  @media (min-width: 600px) {
    #gocars-modal footer {
      flex-direction: row;
      align-items: center;
    }
  }
  
  #gocars-modal footer a {
    margin-left: auto;
    padding: 14px 0px;
  }
  
  /* Cookie Icon */
  #gocars-cookie-icon {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 10px;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0px;
    border: none;
    background-color: var(--cookieIconColor);
    cursor: pointer;
    box-shadow: 0px 0px 6px 0px #0000001a;
    pointer-events: auto;
    animation: gocars-fadeIn 0.3s ease-in-out forwards;
  }
  
  #gocars-cookie-icon.bottomRight {
    left: auto;
    right: 10px;
  }
  
  #gocars-cookie-icon svg {
    fill: var(--cookieIconBackgroundColor);
  }
  
  /* --------------------------------
    Backdrop
  -------------------------------- */
  #gocars-backdrop {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--backdropBackgroundColor);
    backdrop-filter: blur(var(--backdropBackgroundBlur));
    pointer-events: all;
  }
  
  /* --------------------------------
    Animations
  -------------------------------- */
  @keyframes gocars-fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes gocars-slideInDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes gocars-slideInDown-center {
    from {
      opacity: 0;
      transform: translate(-50%, calc(-50% - 20px));
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
  
  @keyframes gocars-slideInDown-bottomCenter {
    from {
      opacity: 0;
      transform: translate(-50%, -20px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
  
  @keyframes gocars-slideInUp-center {
    from {
      opacity: 0;
      transform: translate(0px, 20px);
    }
    to {
      opacity: 1;
      transform: translate(0px, 0px);
    }
  }
  