/*
 * complianz-sbm.css
 *
 * SBM-specific Complianz cookie banner styling.
 * Enqueued via inc/enqueue.php after the main theme stylesheets.
 *
 * Keeps Complianz customisation separate from custom.css so it is not
 * lost if the Complianz plugin custom CSS field is cleared or reset.
 */

/* Hide "Manage Consent" title */
.cmplz-cookiebanner .cmplz-title {
    display: none !important;
}

/* Remove top padding gap left by hidden title */
.cmplz-cookiebanner .cmplz-header {
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

/* Document links inline with separator */
.cmplz-documents.cmplz-links {
    margin-top: 8px;
}

.cmplz-documents.cmplz-links ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmplz-documents.cmplz-links ul li {
    display: inline-flex;
    align-items: center;
}

/* Hide the empty impressum placeholder entirely */
.cmplz-documents.cmplz-links .cmplz-link.impressum,
.cmplz-documents.cmplz-links li:has(.impressum) {
    display: none !important;
}

/* Separator between visible links only */
.cmplz-documents.cmplz-links ul li + li:not(:has(.impressum))::before {
    content: '|';
    margin: 0 4px;
    color: rgb(68, 68, 68);
    opacity: 0.5;
}

/* Override Complianz hyperlink colour variable */
#cmplz-cookiebanner-container {
    --cmplz_hyperlink_color: rgb(68, 68, 68);
    --cmplz_link_font_size: 16px;
}

/* Link style matching original "Read More" computed styles */
.cmplz-documents.cmplz-links .cmplz-link {
    color: rgb(68, 68, 68);
    text-decoration: underline;
    text-decoration-color: rgb(68, 68, 68);
    font-size: 16px;
    font-weight: 550;
    display: inline-block;
    margin: 5px;
    transition: all 0.35s ease;
    opacity: 1;
}

.cmplz-documents.cmplz-links .cmplz-link:hover {
    opacity: 0.7;
}

/* Match message text size to Cookie Policy / Privacy Statement links */
.cmplz-cookiebanner .cmplz-message p {
    font-size: 16px;
    color: rgb(68, 68, 68);
    font-weight: 550;
}

/* Reposition banner — do not override transform as Complianz uses it
   for centred positioning. Position is set via the Complianz web app. */

/* Cookie Consent tab styling */
#cmplz-manage-consent .cmplz-manage-consent {
    right: 100px !important;
    border-radius: 6px 6px 0 0 !important;
    background-color: #1c264b !important;
    color: #ffffff !important;
    border-color: #1c264b !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in !important;
    height: auto !important;
}

#cmplz-manage-consent .cmplz-manage-consent:hover {
    padding-bottom: 1.2rem !important;
    color: #ffffff !important;
}

/* Cookie Consent tab — hidden on load, slides up on scroll.
   Complianz uses position:fixed and bottom on the button element directly,
   so we must control bottom on the button, not transform on the container.
   Default state: push below viewport using a large negative bottom value.
   cmplz-show-tab on the container (added by complianz-sbm.js) reveals it.
   Transition delay on entry gives the scroll-to-top button time to settle
   before the Cookie Consent tab follows, avoiding the choppy overlap. */
#cmplz-manage-consent .cmplz-manage-consent {
    bottom: -120px !important;
    animation: none !important;
    transition: bottom 0.4s ease-in, padding-bottom 0.2s ease-in !important;
}

#cmplz-manage-consent.cmplz-show-tab .cmplz-manage-consent {
    bottom: 0 !important;
    transition: bottom 0.6s ease-in 0.2s, padding-bottom 0.2s ease-in !important;
}
