/*
 * Colorbox brand layer on top of the Orisa template.
 *
 * The template's own orange (#F0460E / rgba(240, 70, 14)) was also hard-coded
 * 32 times in main.css, so those were replaced with the Colorbox orange in our
 * copy of main.css. The variable is set here too, for anything that reads it.
 */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --at-theme-primary: #f7931e;
}

/* An uploaded logo file sitting in the template's logo slot. */
.cb-logo-img {
    display: block;
    height: 36px;
    width: auto;
}

/*
 * main.css inverts header and menu logos in dark mode, because the template
 * ships a plain black logo. Colorbox artwork is in colour (inverting turns the
 * orange blue), so never filter it; dark mode swaps files instead.
 */
.cb-logo-img,
.cb-logo-mark {
    filter: none !important;
}

.cb-logo--dark-mode {
    display: none;
}

[data-bs-theme="dark"] .cb-logo--dark-mode {
    display: block;
}

[data-bs-theme="dark"] .cb-logo--light-mode {
    display: none;
}

/*
 * Only one logo file uploaded: recolour it so it stays visible on the other
 * background. The brand colours are lost, so uploading both files is better.
 */
.cb-logo--whiten,
[data-bs-theme="dark"] .cb-logo--dark-art {
    filter: brightness(0) invert(1) !important;
}

html:not([data-bs-theme="dark"]) .cb-logo--light-art {
    filter: brightness(0) !important;
}

/*
 * Floating WhatsApp button, bottom left. The template's back-to-top button
 * and the sticky MENU button both sit on the right, so the left side keeps
 * it clear of them.
 */
.cb-whatsapp {
    position: fixed;
    left: 30px;
    bottom: 40px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 20px rgba(3, 4, 28, 0.3);
    transition: transform 0.2s ease;
}

.cb-whatsapp:hover,
.cb-whatsapp:focus-visible {
    color: #fff;
    transform: scale(1.06);
}

.cb-whatsapp svg {
    width: 28px;
    height: 28px;
}

@media (max-width: 767px) {
    .cb-whatsapp {
        left: 16px;
        bottom: 20px;
        width: 52px;
        height: 52px;
    }
}

/* Enquiry form feedback, styled to sit inside the template's forms. */
.cb-form-alert {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.cb-form-alert--error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #b91c1c;
}

.cb-form-alert--success {
    background: rgba(247, 147, 30, 0.1);
    border: 1px solid rgba(247, 147, 30, 0.45);
    color: inherit;
}

.cb-form-alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
    list-style: disc;
}

/*
 * Home hero: the page's SEO H1 sits in the template's small intro slot, so it
 * must look like the plain text it replaced, not like a heading.
 */
.cb-hero-h1 {
    font-family: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: none;
}

/*
 * Rich text from the admin editor (service copy, posts, case studies). The
 * template only styles its own hand-written markup, so editor output needs
 * spacing and list styles of its own.
 */
.cb-rich-text > * + * {
    margin-top: 1.1em;
}

.cb-rich-text h2,
.cb-rich-text h3,
.cb-rich-text h4 {
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.2;
}

.cb-rich-text h2 { font-size: 1.75em; }
.cb-rich-text h3 { font-size: 1.4em; }
.cb-rich-text h4 { font-size: 1.15em; }

.cb-rich-text p {
    margin-bottom: 0;
}

.cb-rich-text ul,
.cb-rich-text ol {
    padding-left: 1.4em;
}

.cb-rich-text ul { list-style: disc; }
.cb-rich-text ol { list-style: decimal; }

.cb-rich-text li + li {
    margin-top: 0.4em;
}

.cb-rich-text a {
    color: var(--at-theme-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cb-rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.cb-rich-text blockquote {
    padding-left: 1.2em;
    border-left: 3px solid var(--at-theme-primary);
    font-style: italic;
}

.cb-rich-text table {
    width: 100%;
    border-collapse: collapse;
}

.cb-rich-text th,
.cb-rich-text td {
    padding: 10px 12px;
    border: 1px solid rgba(3, 4, 28, 0.12);
    text-align: left;
}

/*
 * Moving logo strip. The template's sample logos are small files (~170x45),
 * so it sets no size; uploaded logos come in at any size and would fill the
 * strip. Cap them to the same box, keeping each logo's proportions.
 */
.carouselTicker .brand-item img {
    width: auto;
    height: auto;
    max-width: 170px;
    max-height: 60px;
}

/* Clients page: all uploaded logos in a wall instead of the moving ticker. */
.cb-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.cb-logo-grid .brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 20px;
    border: 1px solid rgba(3, 4, 28, 0.08);
    border-radius: 16px;
}

.cb-logo-grid img {
    max-height: 60px;
    width: auto;
}

/* Google Maps embed pasted into Settings. */
.cb-map iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: 0;
}

/* Honeypot field: hidden from people, still submitted by bots. */
.cb-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
