/*
  Silktide Consent Manager - https://silktide.com/consent-manager/

  Styles are at risked of being overridden by styles coming from the site the consent manager is used on.
  To help prevent this, global wrapper elements are prefixed with "#silktide-"
*/

/* --------------------------------
  Global Styles - These elements exist in the main DOM and styling is limited to positioning and animation
-------------------------------- */
/* Wrapper (Global) */
#silktide-wrapper {
    /* Global */
    --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: "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    /* Color Scheme - Updated to match OPTUMYTE theme */
    --primaryColor: #0066ff;
    --backgroundColor: #FFFFFF;
    --textColor: #0f172a;
    --bg-secondary: #f8fafc;
    --borderColor: #e2e8f0;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    /* Backdrop */
    --backdropBackgroundColor: #00000033;
    --backdropBackgroundBlur: 0px;
    /* Cookie Icon - Updated to match OPTUMYTE theme */
    --cookieIconColor: #0066ff;
    --cookieIconBackgroundColor: #FFFFFF;
    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) */
  #silktide-backdrop-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    border: 0px;
    display: none;
  }

  /* --------------------------------
    Links
  -------------------------------- */
  #silktide-wrapper a {
    all: unset;
    display: inline-block;
    color: var(--primaryColor);
    text-decoration: underline;
  }

  #silktide-wrapper a:hover {
    cursor: pointer;
    color: var(--textColor);
  }

  /* --------------------------------
    Focus Styles
  -------------------------------- */
  #silktide-wrapper a:focus,
  #silktide-wrapper #silktide-banner button:focus,
  #silktide-wrapper #silktide-modal button:focus,
  #silktide-wrapper #silktide-cookie-icon:focus {
    outline: none;
    box-shadow: var(--focus);
    border-radius: 5px;
  }

  #silktide-wrapper #silktide-cookie-icon:focus {
    border-radius: 50%;
  }

  /* --------------------------------
    General Styles
  -------------------------------- */

  #silktide-wrapper .st-button {
    color: var(--backgroundColor);
    background-color: var(--primaryColor);
    border: 2px 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;
  }

  #silktide-wrapper .st-button--primary {
  }

  #silktide-wrapper .st-button--primary:hover {
    background-color: var(--backgroundColor);
    color: var(--primaryColor);
  }

  #silktide-wrapper .st-button--secondary {
    background-color: var(--backgroundColor);
    color: var(--primaryColor);
  }

  #silktide-wrapper .st-button--secondary:hover {
    background-color: var(--primaryColor);
    color: var(--backgroundColor);
  }

  /* --------------------------------
    Banner
  -------------------------------- */
  #silktide-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: silktide-slideInDown 350ms ease-out forwards;
    animation-delay: 0.3s;
    box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
    display: block;
  }

  #silktide-banner:focus {
    border-radius: 50%;
  }

  #silktide-banner.center {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    position: fixed;
    transform: translate(-50%, calc(-50% - 20px));
    animation: silktide-slideInDown-center 350ms ease-out forwards;
  }

  #silktide-banner.bottomLeft {
    bottom: 16px;
    left: 16px;
    position: fixed;
  }

  #silktide-banner.bottomCenter {
    bottom: 16px;
    left: 50%;
    position: fixed;
    transform: translate(-50%, -20px);
    animation: silktide-slideInDown-bottomCenter 350ms ease-out forwards;
  }

/* Bottom Banner Styles - Must override all other positioning */
#silktide-banner.bottom-banner {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    transform: none !important;
    animation: silktide-slideInUp-bottom 350ms ease-out forwards;
    box-shadow: 0 -2px 20px rgba(0, 102, 255, 0.15);
    position: fixed !important;
    z-index: 100000 !important; /* Lower than header (100001) and mobile menu (100002) */
    padding: 20px 24px !important;
    max-height: none !important;
    overflow: visible !important;
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    display: block !important;
    visibility: visible !important;
    /* Override any conflicting animations */
    animation-delay: 0s !important;
    opacity: 1 !important;
    /* Ensure proper text display */
    line-height: 1.5 !important;
}

/* Mobile-specific styles for bottom banner */
@media (max-width: 768px) {
    #silktide-banner.bottom-banner {
        padding: 16px 20px !important;
        max-height: 120px !important;
        overflow: hidden !important;
        z-index: 100000 !important; /* Ensure proper layering */
    }

    #silktide-banner .simple-banner-content {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    #silktide-banner .banner-text {
        font-size: 14px;
        line-height: 1.4;
        text-align: center;
    }

    #silktide-banner .banner-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #silktide-banner .st-button {
        padding: 12px 20px; /* Increased padding for touch */
        font-size: 14px;
        width: 100%;
        text-align: center;
        min-height: 44px; /* Touch-friendly minimum height */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #silktide-banner .privacy-choices-link {
        text-align: center;
        padding: 10px 16px; /* Increased padding for touch */
        font-size: 13px;
        min-height: 44px; /* Touch-friendly minimum height */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #silktide-banner.bottom-banner {
        padding: 12px 16px !important;
        max-height: 100px !important;
    }

    #silktide-banner .banner-text {
        font-size: 13px;
        line-height: 1.3;
    }

    #silktide-banner .st-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Ensure banner doesn't interfere with mobile navigation */
@media (max-width: 768px) {
    body {
        padding-bottom: 120px !important; /* Account for mobile banner height */
    }

    .header {
        margin-bottom: 0;
        z-index: 100001 !important; /* Higher than banner */
    }

    /* Ensure main content is not hidden behind banner */
    .main-content,
    .hero,
    .services,
    .about,
    .contact {
        margin-bottom: 120px;
    }

    /* Prevent banner from interfering with scrolling */
    #silktide-banner.bottom-banner {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        will-change: transform; /* Optimize for animations */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        z-index: 100000 !important; /* Ensure proper layering */
    }

    /* Ensure banner content is properly contained */
    #silktide-banner .simple-banner-content {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Simple Banner Content Styles */
#silktide-banner .simple-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

#silktide-banner .banner-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
    color: var(--textColor);
    max-width: 600px;
    font-weight: 500;
    font-family: var(--fontFamily);
}

#silktide-banner .banner-actions {
    display: flex !important; /* Force display */
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    visibility: visible !important; /* Force visibility */
    opacity: 1 !important; /* Force opacity */
}

/* OPTUMYTE-style button styling */
  #silktide-banner .st-button {
    color: var(--white, #ffffff);
    background: var(--gradient-primary, linear-gradient(135deg, #0066ff 0%, #00d4ff 100%));
    border: 2px solid transparent;
    padding: 12px 24px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    font-family: var(--fontFamily);
  }

  #silktide-banner .st-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
  }

  #silktide-banner .st-button:active {
    transform: translateY(0);
  }

  #silktide-banner .st-button--primary {
    background: var(--gradient-primary, linear-gradient(135deg, #0066ff 0%, #00d4ff 100%));
    color: var(--white, #ffffff);
  }

  #silktide-banner .st-button--secondary {
    background: var(--white, #ffffff);
    color: var(--primaryColor, #0066ff);
    border: 2px solid var(--primaryColor, #0066ff);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.1);
  }

  #silktide-banner .st-button--secondary:hover {
    background: var(--primaryColor, #0066ff);
    color: var(--white, #ffffff);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
  }

  #silktide-banner .privacy-choices-link {
    color: var(--primaryColor);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
  }

  #silktide-banner .privacy-choices-link:hover {
    color: var(--primaryColor);
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--primaryColor);
    text-decoration: none;
  }

  #silktide-banner .banner-close {
    background: none;
    border: none;
    color: var(--textColor);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #silktide-banner .banner-close:hover {
    background-color: var(--bg-secondary);
    color: var(--primaryColor);
    transform: scale(1.1);
  }

  #silktide-banner .preferences {
    display: flex;
    gap: 5px;
    border: none;
    padding: 15px 0px;
    background-color: transparent;
    color: var(--primaryColor);
    cursor: pointer;
    font-size: 16px;
  }

  #silktide-banner .preferences span {
    display: block;
    white-space: nowrap;
    text-decoration: underline;
  }

  #silktide-banner .preferences span:hover {
    color: var(--textColor);
  }

  #silktide-banner .preferences:after {
    display: block;
    content: '>';
    text-decoration: none;
  }

  #silktide-banner p {
    font-size: 16px;
    line-height: 24px;
    margin: 0px 0px 15px;
  }

  #silktide-banner a {
    display: inline-block;
    color: var(--primaryColor);
    text-decoration: underline;
    background-color: var(--backgroundColor);
  }

  #silktide-banner a:hover {
    color: var(--textColor);
  }

  #silktide-banner a.silktide-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--primaryColor); /* passed down to svg > path */
    margin-left: auto;
    width: 48px;
    height: 48px;
  }


  #silktide-banner .actions {
    display: flex;
    gap: 16px;
    flex-direction: column;
    margin-top: 24px;
  }

  @media (min-width: 600px) {
    #silktide-banner .actions {
      flex-direction: row;
      align-items: center;
    }
  }

  #silktide-banner .actions-row {
    display: flex;
    gap: 16px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
  }

  /* Privacy Choices Section Styles */
  #silktide-banner .privacy-choices-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--textColor);
    margin: 0 0 16px 0;
    font-family: var(--fontFamily);
  }

  #silktide-banner .privacy-choices-section {
    margin: 24px 0;
    padding: 20px;
    background-color: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
    border: 1px solid var(--borderColor, #e2e8f0);
  }

  #silktide-banner .section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--textColor);
    margin: 0 0 16px 0;
    font-family: var(--fontFamily);
  }

  #silktide-banner .privacy-choices-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #silktide-banner .privacy-choice-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background-color: var(--backgroundColor);
    border: 1px solid var(--borderColor, #e2e8f0);
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 16px;
  }

  #silktide-banner .privacy-choice-item:hover {
    border-color: var(--primaryColor);
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
  }

  #silktide-banner .privacy-choice-item.always-active-item {
    background-color: rgba(0, 102, 255, 0.05);
    border-color: var(--primaryColor);
  }

  #silktide-banner .choice-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
  }

  #silktide-banner .choice-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primaryColor);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
  }

  #silktide-banner .choice-text {
    flex: 1;
  }

  #silktide-banner .choice-text h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--textColor);
    margin: 0 0 8px 0;
    font-family: var(--fontFamily);
  }

  #silktide-banner .choice-text p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--textColor);
    margin: 0;
    opacity: 0.8;
  }

  #silktide-banner .choice-status.always-active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
  }

  #silktide-banner .always-active-badge {
    background: var(--gradient-primary, linear-gradient(135deg, #0066ff 0%, #00d4ff 100%));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #silktide-banner .choice-toggle {
    position: relative;
  }

  #silktide-banner .privacy-toggle {
    opacity: 0;
    position: absolute;
  }

  #silktide-banner .toggle-label {
    display: inline-block;
    width: 60px;
    height: 32px;
    background-color: #cbd5e1;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  #silktide-banner .toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28px;
    height: 28px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  #silktide-banner .privacy-toggle:checked + .toggle-label {
    background-color: var(--primaryColor);
  }

  #silktide-banner .privacy-toggle:checked + .toggle-label::after {
    transform: translateX(28px);
  }

  #silktide-banner .privacy-toggle:focus + .toggle-label {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.3);
  }

  /* --------------------------------
    Modal
  -------------------------------- */
  #silktide-modal {
    margin-top: 50px;
    display: none;
    pointer-events: auto;
    overflow: auto;
    width: 800px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    border: 0px;
    transform: translate(0px, -20px);
    opacity: 0;
    animation: silktide-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: 12px;
    box-sizing: border-box;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100000;
  }

  /* --------------------------------
    Modal - Header
  -------------------------------- */
  #silktide-modal header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
  }

  #silktide-modal h1 {
    font-family: var(--fontFamily);
    color: var(--textColor);
    font-size: 24px;
    font-weight: 500;
    margin: 0px;
  }

  #silktide-modal .modal-close {
    display: inline-flex;
    border: none;
    padding: 13px;
    border: 0px;
    cursor: pointer;
    background: var(--backgroundColor);
    color: var(--primaryColor);
  }

  #silktide-modal .modal-close svg {
    fill: var(--primaryColor);
  }

  /* --------------------------------
    Modal - Content
  -------------------------------- */

  #silktide-modal section {
    flex: 1;
    margin-top: 32px;
  }

  #silktide-modal section::-webkit-scrollbar {
    display: block; /* Force scrollbars to show */
    width: 5px; /* Width of the scrollbar */
  }

  #silktide-modal section::-webkit-scrollbar-thumb {
    background-color: var(--textColor); /* Color of the scrollbar thumb */
    border-radius: 10px; /* Rounded corners for the thumb */
  }

  #silktide-modal p {
    font-size: 16px;
    line-height: 24px;
    color: var(--textColor);
    margin: 0px 0px 15px;
  }

  #silktide-modal p:last-of-type {
    margin: 0px;
  }

  #silktide-modal fieldset {
    padding: 0px;
    border: none;
    margin: 0px 0px 32px;
  }

  #silktide-modal fieldset:last-of-type {
    margin: 0px;
  }

  #silktide-modal legend {
    padding: 0px;
    margin: 0px 0px 10px;
    font-weight: 700;
    color: var(--textColor);
    font-size: 16px;
  }

  #silktide-modal .cookie-type-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
  }

  /* --------------------------------
    Modal - Switches
  -------------------------------- */
  #silktide-modal .switch {
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    height: 34px;
    width: 74px;
    cursor: pointer;
  }

  #silktide-modal .switch:focus-within {
    outline: none;
    box-shadow: var(--focus);
    border-radius: 25px;
  }

  #silktide-modal .switch input {
    opacity: 0;
    position: absolute;
  }

  /* Unchecked Switch Styles */
  #silktide-modal .switch__pill {
    position: relative;
    display: block;
    height: 34px;
    width: 74px;
    background: var(--textColor);
    border-radius: 25px;
  }

  #silktide-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;
  }

  #silktide-modal .switch__off,
  #silktide-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;
  }

  #silktide-modal .switch__off {
    opacity: 1;
  }

  #silktide-modal .switch__on {
    opacity: 0;
  }

  /* Checked Switch Styles */
  #silktide-modal .switch input:checked + .switch__pill {
    background: var(--primaryColor);
  }

  #silktide-modal .switch input:checked ~ .switch__dot {
    left: calc(100% - 32px);
  }

  #silktide-modal .switch input:checked ~ .switch__off {
    right: calc(100% - 32px);
    opacity: 0;
  }

  #silktide-modal .switch input:checked ~ .switch__on {
    right: calc(100% - 34px);
    opacity: 1;
  }

  /* Disabled Switch Styles */
  #silktide-modal .switch input:disabled + .switch__pill {
    opacity: 0.65;
    cursor: not-allowed;
  }

  /* --------------------------------
    Modal - Footer
  -------------------------------- */
  #silktide-modal footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
  }

  @media (min-width: 600px) {
    #silktide-modal footer {
      flex-direction: row;
      align-items: center;
    }
  }

  #silktide-modal footer a {
    margin-left: auto;
    padding: 14px 0px;
  }

  /* Cookie Icon */
  #silktide-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: silktide-fadeIn 0.3s ease-in-out forwards;
  }

  #silktide-cookie-icon.bottomRight {
    left: auto;
    right: 10px;
  }

  #silktide-cookie-icon svg {
    fill: var(--cookieIconBackgroundColor);
  }

  /* --------------------------------
    Backdrop
  -------------------------------- */
  #silktide-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    pointer-events: all;
    z-index: 99999;
  }

  /* --------------------------------
    Animations
  -------------------------------- */
  @keyframes silktide-fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes silktide-slideInDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes silktide-slideInDown-center {
    from {
      opacity: 0;
      transform: translate(-50%, calc(-50% - 20px));
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }

  @keyframes silktide-slideInDown-bottomCenter {
    from {
      opacity: 0;
      transform: translate(-50%, -20px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  @keyframes silktide-slideInUp-center {
    from {
      opacity: 0;
      transform: translate(-50%, calc(-50% + 20px));
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }

  @keyframes silktide-slideInUp-bottom {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }