/*
 * MtdCpanel section styles (1.0.9).
 * Loaded on every page-builder page after the theme, so builder sections keep their own
 * spacing even when a theme styles client-area cards (.card-header) or banners globally.
 */

/* ---------- Heading scale inside builder sections ---------- */
/* Serepok's theme.css sizes h1-h6 and .h1-.h6 with Lagom variables (--font-size-h1 ...)
   that the theme never defines, so headings such as <h2 class="h1 sec-title"> fell back to
   body size. Builder sections define the scale themselves. */

.sec,
.site-banner {
    --font-size-h1: clamp(2rem, 1.35rem + 2.1vw, 2.85rem);
    --font-size-h2: clamp(1.75rem, 1.3rem + 1.4vw, 2.3rem);
    --font-size-h3: clamp(1.4rem, 1.2rem + 0.6vw, 1.65rem);
    --font-size-h4: 1.3rem;
    --font-size-h5: 1.125rem;
    --font-size-h6: 1rem;
    --font-weight-h1: 800;
    --font-weight-h2: 700;
    --font-weight-h3: 700;
    --font-weight-h4: 600;
    --font-weight-h5: 600;
    --font-weight-h6: 600;
    --line-height-h1: 1.12;
    --line-height-h2: 1.18;
    --line-height-h3: 1.25;
    --line-height-h4: 1.3;
    --line-height-h5: 1.35;
    --line-height-h6: 1.4;
}

/* ---------- FAQ list ---------- */

.sec.faqs .card-faqs-group {
    --mtd-faq-accent: var(--mtd-scheme-primary, var(--primary, #2677ce));
    --mtd-faq-surface: #ffffff;
    --mtd-faq-border: color-mix(in srgb, var(--mtd-faq-accent) 14%, #e2e8f0);
    --mtd-faq-border-active: color-mix(in srgb, var(--mtd-faq-accent) 38%, #e2e8f0);
    --mtd-faq-icon-bg: color-mix(in srgb, var(--mtd-faq-accent) 10%, #ffffff);
    --mtd-faq-text: #17191c;
    --mtd-faq-muted: #4a5466;
    --mtd-faq-shadow: 0 22px 44px -30px rgba(15, 35, 75, 0.45);
    display: block;
}

.sec.faqs .card-faqs-group .card {
    margin: 0;
    border: 1px solid var(--mtd-faq-border);
    border-radius: 14px;
    background: var(--mtd-faq-surface);
    box-shadow: none;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sec.faqs .card-faqs-group .card + .card {
    margin-top: 12px;
}

.sec.faqs .card-faqs-group .card:hover {
    border-color: var(--mtd-faq-border-active);
}

.sec.faqs .card-faqs-group .card.accordion-active {
    border-color: var(--mtd-faq-border-active);
    box-shadow: var(--mtd-faq-shadow);
}

/* Themes give .card-header a gradient and padding for client-area cards; the FAQ row
   is the button itself, so the header stays flat. */
.sec.faqs .card-faqs-group .card .card-header {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.sec.faqs .card-faqs-group .card .card-header .btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 20px 18px 24px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--mtd-faq-text);
    text-align: left;
    white-space: normal;
}

.sec.faqs .card-faqs-group .card .card-header .btn:focus {
    box-shadow: none;
}

.sec.faqs .card-faqs-group .card .card-header .btn:focus-visible {
    outline: 2px solid var(--mtd-faq-accent);
    outline-offset: -2px;
}

/* Static FAQ style (no button): same spacing on the header itself. */
.sec.faqs .card-faqs-group .card .card-header.px-3 {
    padding: 18px 24px !important;
}

.sec.faqs .card-faqs-group .card .card-title {
    margin: 0 auto 0 0;
    color: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.sec.faqs .card-faqs-group .card.accordion-active .card-title,
.sec.faqs .card-faqs-group .card .card-header .btn:hover .card-title {
    color: var(--mtd-faq-accent);
}

/* Chevron drawn in CSS so it never depends on an icon font weight being loaded. */
.sec.faqs .card-faqs-group .card .card-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mtd-faq-icon-bg);
    color: var(--mtd-faq-accent);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sec.faqs .card-faqs-group .card .card-icon i {
    display: none;
}

.sec.faqs .card-faqs-group .card .card-icon::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.25s ease, margin 0.25s ease;
}

.sec.faqs .card-faqs-group .card.accordion-active .card-icon {
    background: var(--mtd-faq-accent);
    color: #ffffff;
}

.sec.faqs .card-faqs-group .card.accordion-active .card-icon::before {
    margin: -4px 0 0;
    transform: rotate(45deg);
}

.sec.faqs .card-faqs-group .card .card-body {
    padding: 0 24px 22px;
    border: 0;
    background: none;
    color: var(--mtd-faq-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.sec.faqs .card-faqs-group:not(.accordion) .card .card-body {
    padding-top: 18px;
    border-top: 1px solid var(--mtd-faq-border) !important;
}

.sec.faqs .card-faqs-group .card .card-body p,
.sec.faqs .card-faqs-group .card .card-body li {
    color: inherit;
}

.sec.faqs .card-faqs-group .card .card-body > :last-child,
.sec.faqs .card-faqs-group .card .card-body p:last-child {
    margin-bottom: 0;
}

.sec.faqs .card-faqs-group .card .card-body ul {
    margin: 0;
    padding-left: 1.2em;
}

body.dark-mode .sec.faqs .card-faqs-group {
    --mtd-faq-surface: rgba(14, 27, 48, 0.94);
    --mtd-faq-border: rgba(96, 165, 250, 0.2);
    --mtd-faq-border-active: rgba(96, 165, 250, 0.45);
    --mtd-faq-icon-bg: rgba(96, 165, 250, 0.14);
    --mtd-faq-text: #e8f0fb;
    --mtd-faq-muted: rgba(226, 232, 240, 0.82);
    --mtd-faq-shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.7);
}

@media (max-width: 575.98px) {
    .sec.faqs .card-faqs-group .card .card-header .btn {
        gap: 12px;
        padding: 16px 14px 16px 18px;
    }

    .sec.faqs .card-faqs-group .card .card-title {
        font-size: 1rem;
    }

    .sec.faqs .card-faqs-group .card .card-body {
        padding: 0 18px 18px;
    }

    .sec.faqs .card-faqs-group:not(.accordion) .card .card-body {
        padding-top: 16px;
    }
}

/* ---------- Banner height (ported from WBAMS CMS) ---------- */
/* Banner setting "Height": Tall or Full screen. The banner is at least this tall and its text stays centred
   in it, which leaves room for the background and bottom illustrations of the centred banner types (4 and 5). */

.sec.site-banner.site-banner--tall .banner_body,
.sec.site-banner.site-banner--screen .banner_body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sec.site-banner.site-banner--tall .banner_body {
    min-height: max(520px, 74vh);
}

.sec.site-banner.site-banner--screen .banner_body {
    min-height: max(560px, calc(100vh - var(--mtd-header-height, 76px)));
    min-height: max(560px, calc(100svh - var(--mtd-header-height, 76px)));
}

.sec.site-banner.site-banner--tall .banner_body > .banner-content-container,
.sec.site-banner.site-banner--screen .banner_body > .banner-content-container {
    width: 100%;
}

/* Bottom banner illustrations sit on the banner's bottom edge. illustrations.css only did this for the
   home page scene, so the other eleven (cloud, dedicated, game servers, ...) were clipped at their faded top. */
.mtd-illustration-background .graphic-background[class*="graphic-background-bottom-banner-illustration-"] {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Centred banner with a bottom illustration (Type 5) at Tall or Full screen: keep the text above the centre scene. */
.sec.site-banner.site-banner--tall .banner_body.banner-type-5.mtd-has-illustration-background > .banner-content-container,
.sec.site-banner.site-banner--screen .banner_body.banner-type-5.mtd-has-illustration-background > .banner-content-container {
    padding-bottom: clamp(160px, 24vh, 260px);
}

@media (max-width: 767.98px) {
    .sec.site-banner.site-banner--tall .banner_body.banner-type-5.mtd-has-illustration-background > .banner-content-container,
    .sec.site-banner.site-banner--screen .banner_body.banner-type-5.mtd-has-illustration-background > .banner-content-container {
        padding-bottom: 250px;
    }

    .sec.site-banner.site-banner--tall .banner_body {
        min-height: 460px;
    }

    .sec.site-banner.site-banner--screen .banner_body {
        min-height: 520px;
    }
}

/* ---------- Centred banners (call to action) ---------- */
/* Split-banner rules (narrow content, left-aligned text) must not reach the centred layout. */

.site-banner .banner_content.mtd-banner-centered {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.site-banner .banner_content.mtd-banner-centered .sec-caption,
.site-banner .banner_content.mtd-banner-centered .sec-title,
.site-banner .banner_content.mtd-banner-centered .sec-subtitle {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.site-banner .banner_content.mtd-banner-centered .sec-subtitle {
    max-width: 640px;
}

.site-banner .banner_content.mtd-banner-centered .action {
    align-items: center;
    justify-content: center;
}

/* ---------- Screenshots in section pictures ----------
   A Library file whose name ends in "-screenshot" (for example wbams-expenses-screenshot.webp) is a picture of an
   app screen: it gets a frame so its white edges don't melt into the page. Drawn pictures keep no frame. */
.site-banner .banner_graphic img[src*="-screenshot."] {
    border: 1px solid rgba(15, 31, 58, 0.1);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(23, 47, 92, 0.16), 0 4px 14px rgba(23, 47, 92, 0.08);
}

body.dark-mode .site-banner .banner_graphic img[src*="-screenshot."],
html[data-theme="dark"] .site-banner .banner_graphic img[src*="-screenshot."] {
    border-color: rgba(148, 177, 219, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* ---------- Legal documents (text sections with .mtd-legal) ---------- */
.sec.editor .mtd-legal {
    max-width: 820px;
    margin: 0 auto;
    color: var(--mtd-muted, #4b5a70);
    font-size: 16px;
    line-height: 1.75;
}

.sec.editor .mtd-legal-updated {
    display: inline-block;
    margin: 0 0 18px;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--mtd-primary, #1062fe);
    background: color-mix(in srgb, var(--mtd-primary, #1062fe) 9%, transparent);
    font-size: 13px;
    font-weight: 700;
}

.sec.editor .mtd-legal-intro p {
    margin: 0 0 22px;
    color: var(--mtd-ink, #0f1f3a);
    font-size: 18px;
    line-height: 1.7;
}

.sec.editor .mtd-legal-toc {
    margin: 0 0 40px;
    padding: 22px 26px;
    border: 1px solid color-mix(in srgb, var(--mtd-ink, #0f1f3a) 10%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--mtd-surface, #ffffff) 80%, transparent);
}

.sec.editor .mtd-legal-toc strong {
    display: block;
    margin-bottom: 10px;
    color: var(--mtd-ink, #0f1f3a);
    font-size: 15px;
}

.sec.editor .mtd-legal-toc ol {
    columns: 2 240px;
    column-gap: 32px;
    margin: 0;
    padding-left: 20px;
}

.sec.editor .mtd-legal-toc li {
    margin: 0 0 6px;
    break-inside: avoid;
}

.sec.editor .mtd-legal-toc a {
    font-weight: 600;
    text-decoration: none;
}

.sec.editor .mtd-legal section {
    padding-top: 10px;
    scroll-margin-top: 96px;
}

.sec.editor .mtd-legal section + section {
    margin-top: 26px;
    padding-top: 28px;
    border-top: 1px solid color-mix(in srgb, var(--mtd-ink, #0f1f3a) 9%, transparent);
}

.sec.editor .mtd-legal h2 {
    margin: 0 0 14px;
    color: var(--mtd-ink, #0f1f3a);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.sec.editor .mtd-legal p {
    margin: 0 0 14px;
}

.sec.editor .mtd-legal ul {
    margin: 0 0 14px;
    padding-left: 22px;
}

.sec.editor .mtd-legal li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.sec.editor .mtd-legal li::marker {
    color: var(--mtd-primary, #1062fe);
}

.sec.editor .mtd-legal strong {
    color: var(--mtd-ink, #0f1f3a);
}

@media (max-width: 767px) {
    .sec.editor .mtd-legal-intro p { font-size: 17px; }
    .sec.editor .mtd-legal-toc { padding: 18px 18px; }
    .sec.editor .mtd-legal h2 { font-size: 20px; }
}

.sec.editor .mtd-legal p,
.sec.editor .mtd-legal li {
    color: color-mix(in srgb, var(--mtd-ink, #0f1f3a) 78%, transparent);
}

/* Domain search block: its title can be the page's main heading (h1) or a section heading (h2); same look. */
.mtd-domain-engine__header h1 {
    margin: 0;
    color: var(--text, #111827);
    font-size: clamp(1.55rem, 2.4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
}

/* Domain hero card: its title can be the page's main heading (h1); same look as its h2. */
.mtd-domain-home-card h1 {
    display: block;
    margin: 0;
    color: var(--text, #111827);
    font-size: clamp(1.65rem, 2.4vw, 2.55rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
}

body.dark-mode .mtd-domain-home-card h1,
body.dark-mode .mtd-domain-engine__header h1 {
    color: #ffffff !important;
}

/* Domain search CAPTCHA (WHMCS Captcha settings, Domain Checker form) */
.mtd-domain-captcha{margin:14px 0 2px;max-width:100%;overflow:hidden}
.mtd-domain-captcha .recaptcha-container,.mtd-domain-captcha .g-recaptcha{margin:0}
.mtd-domain-engine__form .mtd-domain-captcha,.form-search .search-form + .mtd-domain-captcha{display:flex;justify-content:center}
.mtd-domain-captcha--image{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.mtd-domain-captcha__image{border-radius:8px;border:1px solid rgba(15,23,42,.12);background:#fff}
.mtd-domain-captcha__code{max-width:200px;height:40px}
