/* ================================================================
   endoo – SupportPal frontend design system
   Mirrors Wifi-Tools/includes/styles.css (tools.schulwlan.de) and maps
   its tokens onto SupportPal's colour variables. Deployed to
   resources/assets/endoo/css/endoo.css, loaded after SupportPal's CSS.
   ================================================================ */

/* -- Montserrat (lokal, DSGVO-konform) -- */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url(../fonts/Montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url(../fonts/Montserrat-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ================================================================
   TOKENS
   endoo tokens (--endoo-*) + overrides of SupportPal's scheme variables
   (normally injected inline from Settings › Brand colours).
   ================================================================ */
:root.endoo {
    /* Wifi-Tools palette */
    --endoo-primary: #006f3d;
    --endoo-primary-dark: #004d2a;
    --endoo-primary-mid: #2a9d5c;
    --endoo-primary-light: #e6f6ee;
    --endoo-green: #28a866;
    --endoo-green-bg: #e6f6ee;
    --endoo-orange: #e0892e;
    --endoo-orange-bg: #fef3e2;
    --endoo-red: #d94848;
    --endoo-red-bg: #fde8e8;
    --endoo-blue: #1a5fa8;
    --endoo-blue-bg: #e8f1fa;
    --endoo-gray-50: #f8f9fa;
    --endoo-gray-100: #f1f3f5;
    --endoo-gray-200: #e2e6ea;
    --endoo-gray-300: #cdd3d9;
    --endoo-gray-500: #8a929a;
    --endoo-gray-700: #434a52;
    --endoo-gray-900: #1a1e23;
    --endoo-surface: #ffffff;
    --endoo-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --endoo-shadow-md: 0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --endoo-shadow-lg: 0 10px 30px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
    --endoo-radius: 10px;
    --endoo-radius-sm: 6px;
    --endoo-hero-gradient: linear-gradient(135deg, var(--endoo-primary-dark) 0%, var(--endoo-primary) 60%, var(--endoo-primary-mid) 100%);
    --endoo-topbar-height: 64px;

    /* SupportPal scheme → endoo green */
    --color-primary-100: #e6f6ee;
    --color-primary-200: #bfe7d1;
    --color-primary-300: #8fd3ae;
    --color-primary-400: #4fb57f;
    --color-primary-500: #2a9d5c;
    --color-primary-600: #00854a;
    --color-primary-700: #006f3d;
    --color-primary-800: #005a32;
    --color-primary-900: #004d2a;
    --color-background-primary: #ffffff;
    --color-background-secondary: #f8f9fa;
    --color-background-tertiary: #e2e6ea;
    --color-text-primary: #1a1e23;
    --color-text-secondary: #5f6770;
    --color-text-tertiary: #8a929a;

    /* Typography */
    --sp-default-font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media screen {
    :root.endoo.sp-theme-dark {
        --endoo-primary-light: #12301f;
        --endoo-green-bg: #0f2a1a;
        --endoo-orange-bg: #2a1f0f;
        --endoo-red-bg: #2a0f0f;
        --endoo-blue-bg: #0f1d2a;
        --endoo-gray-50: #0f1215;
        --endoo-gray-100: #181c20;
        --endoo-gray-200: #2a2f35;
        --endoo-gray-300: #3a4049;
        --endoo-gray-500: #8a929a;
        --endoo-gray-700: #c0c6cc;
        --endoo-gray-900: #e8ecf0;
        --endoo-surface: #1a1e23;
        --endoo-shadow-sm: 0 1px 3px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.15);
        --endoo-shadow-md: 0 4px 12px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.15);
        --endoo-shadow-lg: 0 10px 30px rgba(0,0,0,.35), 0 4px 8px rgba(0,0,0,.2);

        /* SupportPal dark scheme: light greens for links/text accents, neutral surfaces */
        --color-primary-100: #c9efd9;
        --color-primary-200: #9fdcbb;
        --color-primary-300: #6fc597;
        --color-primary-400: #3fae74;
        --color-primary-500: #2a9d5c;
        --color-primary-600: #1f8a4f;
        --color-primary-700: #176f40;
        --color-primary-800: #0f4a2b;
        --color-primary-900: #0a321d;
        --color-background-primary: #1a1e23;
        --color-background-secondary: #0f1215;
        --color-background-tertiary: #2a2f35;
        --color-text-primary: #e8ecf0;
        --color-text-secondary: #c0c6cc;
        --color-text-tertiary: #8a929a;
    }
}

/* ================================================================
   BASE
   ================================================================ */
html.endoo { overflow-x: clip; }
.endoo-body {
    font-family: var(--sp-default-font-family);
    background: var(--endoo-gray-50);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.endoo-body .endoo-main { flex: 1 0 auto; }
.endoo-body h1, .endoo-body h2, .endoo-body h3, .endoo-body h4 { letter-spacing: -.01em; }

/* ================================================================
   TOPBAR (sticky, slim)
   ================================================================ */
.endoo-topbar {
    background: var(--endoo-surface);
    border-bottom: 1px solid var(--endoo-gray-200);
    box-shadow: none;
}
.endoo-topbar .sp-logo { max-height: 40px; width: auto; }
.endoo-topnav { display: flex; align-items: center; gap: .25rem; }
.endoo-topnav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .8rem;
    border-radius: var(--endoo-radius-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--endoo-gray-700);
    text-decoration: none;
    transition: background .15s, color .15s;
}
/* Links and buttons in the topbar share one size (same font, line height and padding → same height). */
.endoo-topnav .endoo-topnav-link,
.endoo-topnav .endoo-btn {
    font-size: .85rem;
    line-height: 1.25;
    padding: .5rem .9rem;
    border: 1px solid transparent;
}
.endoo-topnav-link:hover,
.endoo-topnav-link.current { background: var(--endoo-primary-light); color: var(--endoo-primary); }
html.sp-theme-dark .endoo-topnav-link:hover,
html.sp-theme-dark .endoo-topnav-link.current { color: var(--color-primary-200); }

/* ================================================================
   HERO (Wifi-Tools header)
   ================================================================ */
.endoo-hero {
    background: var(--endoo-hero-gradient);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 0 1.5rem;
}
.endoo-hero::before,
.endoo-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.endoo-hero::before {
    top: -40%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
}
.endoo-hero::after {
    bottom: -60%; left: -5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
}
.endoo-hero-inner {
    position: relative;
    z-index: 1;
    padding: 2.5rem 0 4rem;
}
.endoo-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
    margin: 0 0 .35rem;
    color: #fff;
    max-width: calc(100% - 9rem); /* keep clear of the toolbar pill */
}
.endoo-hero-desc {
    font-size: .95rem;
    font-weight: 300;
    opacity: .88;
    max-width: 620px;
    margin: 0;
}
.endoo-breadcrumb,
.endoo-hero .sp-breadcrumb {
    font-size: .8rem;
    color: rgba(255,255,255,.75);
    margin-bottom: .6rem;
    max-width: calc(100% - 9rem);
}
.endoo-hero .sp-breadcrumb a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.endoo-hero .sp-breadcrumb a:hover { border-bottom-color: #fff; }

/* Home hero: bigger, centred, with search */
.endoo-hero--home .endoo-hero-inner { padding: 3.5rem 0 5rem; }
.endoo-hero-home { text-align: center; }
.endoo-hero-home .endoo-hero-title { font-size: 2rem; max-width: none; margin-bottom: .5rem; }
.endoo-hero-home .endoo-hero-desc { margin: 0 auto 1.6rem; }
.endoo-hero-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: .4rem .4rem .4rem 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.endoo-hero-search > i { color: var(--endoo-gray-500); }
.endoo-hero-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    outline: 0;
    box-shadow: none !important;
    background: transparent !important;
    font: inherit;
    font-size: 1rem;
    color: #1a1e23 !important;
    padding: .55rem .25rem;
}
.endoo-hero-search input[type="search"]::placeholder { color: #8a929a; }
html.sp-theme-dark .endoo-hero-search { background: #1a1e23; }
html.sp-theme-dark .endoo-hero-search input[type="search"] { color: #e8ecf0 !important; }

/* -- Toolbar pill (language + theme) -- */
.endoo-toolbar {
    position: absolute;
    top: 1.2rem;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3px 4px;
}
.endoo-toolbar a,
.endoo-toolbar button {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 14px;
    font-size: .72rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .15s;
}
.endoo-toolbar a:hover,
.endoo-toolbar button:hover { color: #fff; }
.endoo-toolbar a.active,
.endoo-toolbar button.active { background: rgba(255,255,255,.18); color: #fff; }
.endoo-toolbar .sep { width: 1px; height: 14px; background: rgba(255,255,255,.18); margin: 0 2px; }
.endoo-toolbar svg { width: 15px; height: 15px; display: block; }

/* ================================================================
   MAIN CONTENT – card overlapping the hero
   ================================================================ */
.endoo-main { margin-top: -2.5rem; z-index: 2; }
.endoo-layout { align-items: flex-start; }

.endoo-body .sp-content-inner {
    background: var(--endoo-surface);
    border: 1px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius);
    box-shadow: var(--endoo-shadow-md);
}
/* Sidebar boxes (knowledge base, ticket view) as cards */
.endoo-body .sp-sidebar { margin-top: 0; }
.endoo-body .sp-sidebar-box {
    background: var(--endoo-surface);
    border: 1px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius);
    box-shadow: var(--endoo-shadow-sm);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.endoo-body .sp-sidebar-box h2 {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--endoo-gray-500);
    margin-bottom: .5rem;
}

/* Dashboard / tool pages: cards sit directly on the page background (like tools index) */
.endoo-body--bare .sp-content-inner {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

/* ================================================================
   COMPONENTS
   ================================================================ */

/* -- Buttons -- */
.endoo-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.2rem;
    border-radius: var(--endoo-radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, transform .15s, box-shadow .15s, border-color .15s;
}
.endoo-btn--primary { background: var(--endoo-primary); color: #fff !important; }
.endoo-btn--primary:hover { background: var(--endoo-primary-dark); transform: translateY(-1px); box-shadow: var(--endoo-shadow-sm); }
.endoo-btn--outline { background: transparent; color: var(--endoo-primary) !important; border-color: var(--endoo-primary); }
.endoo-btn--outline:hover { background: var(--endoo-primary-light); transform: translateY(-1px); }
.endoo-btn--secondary { background: var(--endoo-gray-100); color: var(--endoo-gray-700) !important; border-color: var(--endoo-gray-200); }
.endoo-btn--secondary:hover { background: var(--endoo-gray-200); }
.endoo-btn--sm { padding: .38rem .85rem; font-size: .76rem; }
.endoo-btn[disabled] { background: var(--endoo-gray-300); color: #fff !important; cursor: not-allowed; transform: none; }
html.sp-theme-dark .endoo-btn--outline { color: var(--color-primary-200) !important; border-color: var(--color-primary-300); }

/* -- Grid -- */
.endoo-grid { display: grid; gap: 1.5rem; }
.endoo-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.endoo-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .endoo-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .endoo-grid--2, .endoo-grid--3 { grid-template-columns: 1fr; gap: 1rem; } }

/* -- App card (tools index card) -- */
.endoo-app-card {
    background: var(--endoo-surface);
    border: 1px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius);
    box-shadow: var(--endoo-shadow-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
    transition: box-shadow .2s, transform .2s;
}
a.endoo-app-card:hover,
.endoo-app-card:hover { box-shadow: var(--endoo-shadow-lg); transform: translateY(-2px); }
.endoo-app-card-icon {
    width: 52px; height: 52px;
    flex: none;
    border-radius: 14px;
    background: var(--endoo-primary-light);
    color: var(--endoo-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 1.1rem;
}
html.sp-theme-dark .endoo-app-card-icon { color: var(--color-primary-200); }
.endoo-app-card h2 { font-size: 1.12rem; font-weight: 600; margin: 0 0 .35rem; color: var(--endoo-gray-900); }
.endoo-app-card p { font-size: .88rem; font-weight: 400; color: var(--color-text-secondary); margin: 0 0 1.4rem; flex: 1; }
.endoo-app-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; flex-wrap: wrap; }

.endoo-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}
.endoo-badge--extern { background: var(--endoo-orange-bg); color: var(--endoo-orange); }
.endoo-badge--new { background: var(--endoo-primary-light); color: var(--endoo-primary); }

/* -- Sections -- */
.endoo-section { margin-top: 2.25rem; }
.endoo-section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--endoo-gray-900);
}
.endoo-section-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--endoo-primary-light);
    color: var(--endoo-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .85rem;
}
html.sp-theme-dark .endoo-section-icon { color: var(--color-primary-200); }
.endoo-quick-actions { margin-top: 0; }

/* -- Knowledge-base cards -- */
.endoo-kb-card { padding: 1.5rem; }
.endoo-kb-card:hover { transform: none; }
.endoo-kb-card-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: inherit !important;
    text-decoration: none !important;
}
.endoo-kb-card-head .endoo-app-card-icon { margin-bottom: 0; }
.endoo-kb-card-head p { margin-bottom: 0; }
.endoo-kb-card-head:hover h2 { color: var(--endoo-primary); }
html.sp-theme-dark .endoo-kb-card-head:hover h2 { color: var(--color-primary-200); }
.endoo-kb-articles {
    list-style: none;
    margin: 1rem 0 1.2rem;
    padding: .6rem 0 0;
    border-top: 1px solid var(--endoo-gray-200);
}
.endoo-kb-articles li a {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    padding: .38rem .2rem;
    border-radius: 4px;
    font-size: .86rem;
    color: var(--endoo-gray-700) !important;
    text-decoration: none !important;
}
.endoo-kb-articles li a i { color: var(--endoo-gray-500); font-size: .8rem; }
.endoo-kb-articles li a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.endoo-kb-articles li a:hover { background: var(--endoo-gray-50); color: var(--endoo-primary) !important; }
.endoo-kb-card .endoo-app-card-footer { margin-top: 1.2rem; }
.endoo-kb-card .endoo-kb-articles + .endoo-app-card-footer { margin-top: 0; }

/* -- Card with header (Wifi-Tools .card) -- */
.endoo-card {
    background: var(--endoo-surface);
    border: 1px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius);
    box-shadow: var(--endoo-shadow-md);
    min-width: 0;
}
.endoo-card + .endoo-card { margin-top: 1.2rem; }
.endoo-card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--endoo-gray-200);
    font-size: .85rem;
    font-weight: 600;
    color: var(--endoo-gray-700);
}
.endoo-card-header .endoo-card-icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    background: var(--endoo-primary-light);
    color: var(--endoo-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem;
}
.endoo-card-header .endoo-card-aside { margin-left: auto; font-weight: 400; font-size: .78rem; color: var(--endoo-gray-500); }
.endoo-card-body { padding: 1.5rem 1.25rem; min-width: 0; }

/* -- Forms (Wifi-Tools look, scoped to .endoo-form) -- */
.endoo-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.endoo-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .endoo-form-grid { grid-template-columns: 1fr; } }
.endoo-form-group { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.endoo-form-group > label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--endoo-gray-700);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.endoo-form input[type="text"],
.endoo-form input[type="number"],
.endoo-form input[type="url"],
.endoo-form input[type="file"],
.endoo-form select,
.endoo-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    line-height: 1.4;
    max-height: none;              /* SupportPal caps fields at 2.5rem */
    border: 1.5px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius-sm);
    background: var(--endoo-surface);
    color: var(--endoo-gray-900);
    font-family: inherit;
    font-size: .88rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.endoo-form input:focus, .endoo-form select:focus, .endoo-form textarea:focus {
    border-color: var(--endoo-primary);
    box-shadow: 0 0 0 3px rgba(0,111,61,.12);
}
.endoo-form textarea { resize: vertical; min-height: 54px; font-size: .82rem; }
.endoo-form select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a929a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px;
}
.endoo-form ::placeholder { color: var(--endoo-gray-300); }
html.sp-theme-dark .endoo-form input, html.sp-theme-dark .endoo-form select, html.sp-theme-dark .endoo-form textarea {
    background: var(--endoo-gray-100);
    border-color: var(--endoo-gray-300);
}
html.sp-theme-dark .endoo-form ::placeholder { color: var(--endoo-gray-500); }
.endoo-input-hint { font-size: .72rem; color: var(--endoo-gray-500); }

/* ================================================================
   SUPPORTPAL NATIVE FORMS & BUTTONS → endoo look
   SupportPal styles bare input/select/textarea/button elements globally (grey fill, 2px border,
   square corners, bold buttons). These rules give every SupportPal form (login, register, tickets,
   comments, profile …) the same look as .endoo-form / .endoo-btn (Domain-Checker).
   - :where() keeps specificity at element level, so our own classes (.endoo-btn, .endoo-form …)
     always win; unlayered CSS beats SupportPal's layered Tailwind anyway.
   - Excluded: our components, the hero search, TinyMCE (.tox) and SupportPal's coloured buttons.
   ================================================================ */

/* -- Fields --
   Specificity (0,0,1) for the element = same as SupportPal's base rules (input,select,textarea{…});
   endoo.css loads later, so it wins. Exclusions inside :where() protect our own components. */
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=search].sp-search-input)):where(:not(.endoo-form *, .endoo-hero-search *, .tox *)) {
    max-height: none;
    padding: .6rem .8rem;
    border: 1.5px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius-sm);
    background-color: var(--endoo-surface);
    color: var(--endoo-gray-900);
    font-family: inherit;
    font-size: .88rem;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=search].sp-search-input)):where(:not(.endoo-form *, .endoo-hero-search *, .tox *)):focus,
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=search].sp-search-input)):where(:not(.endoo-form *, .endoo-hero-search *, .tox *)):focus-visible {
    border-color: var(--endoo-primary);
    box-shadow: 0 0 0 3px rgba(0,111,61,.12);
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) :is(input, textarea):where(:not(.endoo-form *, .tox *))::placeholder {
    color: var(--endoo-gray-300);
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) select:not([multiple]):where(:not(.endoo-form *)) {
    appearance: none;
    -webkit-appearance: none;
    padding-inline-end: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a929a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px;
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) textarea:where(:not(.endoo-form *, .tox *)) { min-height: 6rem; }
/* Fields directly in a SupportPal form row use the full width (like the Domain-Checker grid) */
:where(.endoo-body .sp-input-container) > :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset])) {
    width: 100%;
}
html.sp-theme-dark :where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar) :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=search].sp-search-input)):where(:not(.endoo-form *, .endoo-hero-search *, .tox *)) {
    background-color: var(--endoo-gray-100);
    border-color: var(--endoo-gray-300);
}

/* -- Labels (uppercase like the Domain-Checker) -- */
:where(.endoo-body .sp-content-inner) .sp-form-row > label:not(:empty) {
    font-size: .72rem;
    font-weight: 600;
    color: var(--endoo-gray-700);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

/* -- Checkboxes / radios: endoo green instead of SupportPal's teal -- */
:where(.endoo-body) input[type=checkbox]:checked::before,
:where(.endoo-body) input[type=checkbox]:checked:hover::before {
    color: #fff;
    background-color: var(--endoo-primary);
    border-color: var(--endoo-primary);
    border-radius: 4px;
}
:where(.endoo-body) :is(input[type=checkbox], input[type=radio]) { background-color: transparent; }
:where(.endoo-body) input[type=checkbox]::before,
:where(.endoo-body) input[type=radio]::before {
    background-color: var(--endoo-surface);
    border-color: var(--endoo-gray-300);
}
:where(.endoo-body) input[type=checkbox]::before { border-radius: 4px; }
:where(.endoo-body) input[type=radio]::before { border-radius: 50%; }
:where(.endoo-body) :is(input[type=checkbox], input[type=radio]):hover::before { border-color: var(--endoo-primary); }
:where(.endoo-body) input[type=radio]:checked::before,
:where(.endoo-body) input[type=radio]:checked:hover::before { background-color: var(--endoo-primary); }

/* -- Buttons --
   :is(button, input[type=submit] …) carries the same specificity as SupportPal's own button rules; hover rules
   repeat :not([disabled]) to match theirs ((0,3,1)). Our components are excluded inside :where(). */
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(button, input[type=submit], input[type=button], input[type=reset], .sp-button):where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-group > *)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1.2rem;           /* = .endoo-btn */
    border: 1px solid var(--endoo-gray-200);
    border-radius: var(--endoo-radius-sm);
    font-family: inherit;
    font-size: .82rem;                /* = .endoo-btn */
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(button.sp-button-sm, input.sp-button-sm, .sp-button-sm):where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *)) {
    padding: .38rem .85rem;
    font-size: .76rem;
}
/* Secondary (default) – SupportPal's red/orange/purple variants keep their own colours */
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(button, input[type=button], input[type=reset], .sp-button):where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-submit, .sp-button-red, .sp-button-orange, .sp-button-purple, [type=submit])) {
    background-color: var(--endoo-gray-100);
    color: var(--endoo-gray-700);
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(button, input[type=button], input[type=reset], .sp-button):not([disabled]):hover:where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-submit, .sp-button-red, .sp-button-orange, .sp-button-purple, [type=submit])) {
    background-color: var(--endoo-gray-200);
    color: var(--endoo-gray-900);
}
/* Primary: submit buttons (login, save, send reply …) */
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(input[type=submit], button[type=submit], .sp-button-submit):where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-red, .sp-button-orange, .sp-button-purple)) {
    background-color: var(--endoo-primary);
    border-color: var(--endoo-primary);
    color: #fff;
}
:where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(input[type=submit], button[type=submit], .sp-button-submit):not([disabled]):hover:where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-red, .sp-button-orange, .sp-button-purple)) {
    background-color: var(--endoo-primary-dark);
    border-color: var(--endoo-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--endoo-shadow-sm);
}
/* Coloured SupportPal variants: endoo shape, own colour, no grey border */
:where(.endoo-body) :where(.sp-button-red, .sp-button-orange, .sp-button-purple) { border-color: transparent; }
/* Button groups keep their joined look, just with the endoo radius */
:where(.endoo-body) .sp-button-group > :is(button, .sp-button, input) { border-radius: 0; font-family: inherit; font-size: .82rem; }
:where(.endoo-body) .sp-button-group > :not(.sp\:hidden):first-child { border-start-start-radius: var(--endoo-radius-sm); border-end-start-radius: var(--endoo-radius-sm); }
:where(.endoo-body) .sp-button-group > :not(.sp\:hidden):not(:has(~ :not(.sp\:hidden))) { border-start-end-radius: var(--endoo-radius-sm); border-end-end-radius: var(--endoo-radius-sm); }
html.sp-theme-dark :where(.endoo-body .sp-content-inner, .endoo-body .sp-sidebar, .endoo-body .sp-dropdown) :is(button, input[type=button], .sp-button):where(:not(.endoo-form *, .endoo-btn, .endoo-hero-search *, .tox, .tox *, .sp-button-submit, .sp-button-red, .sp-button-orange, .sp-button-purple, [type=submit])) {
    background-color: var(--endoo-gray-100);
    border-color: var(--endoo-gray-300);
    color: var(--endoo-gray-700);
}

/* -- Status pill (used by EndooWifiTools plugin) -- */
.endoo-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
    background: var(--endoo-gray-300);
}
.endoo-status-dot--up { background: var(--endoo-green); box-shadow: 0 0 0 4px rgba(40,168,102,.18); }
.endoo-status-dot--warning { background: var(--endoo-orange); box-shadow: 0 0 0 4px rgba(224,137,46,.18); }
.endoo-status-dot--down { background: var(--endoo-red); box-shadow: 0 0 0 4px rgba(217,72,72,.18); }

/* ================================================================
   FOOTER
   ================================================================ */
.endoo-footer {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    margin-top: 2rem;
    font-size: .75rem;
    color: var(--endoo-gray-500);
    border-top: 1px solid var(--endoo-gray-200);
}
.endoo-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem .8rem; }
.endoo-footer a { color: var(--endoo-gray-500); text-decoration: none; transition: color .2s; }
.endoo-footer a:hover { color: var(--endoo-primary); }
html.sp-theme-dark .endoo-footer a:hover { color: var(--color-primary-200); }
.endoo-footer-sep { color: var(--endoo-gray-200); }
.endoo-footer-copy { margin-top: .6rem; color: var(--endoo-gray-500); opacity: .8; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 640px) {
    .endoo-hero { padding: 0 1rem; }
    .endoo-hero-inner { padding: 3.2rem 0 3.5rem; }
    .endoo-hero--home .endoo-hero-inner { padding: 3.4rem 0 4rem; }
    .endoo-hero-title { font-size: 1.3rem; max-width: none; }
    .endoo-hero-home .endoo-hero-title { font-size: 1.5rem; }
    .endoo-breadcrumb, .endoo-hero .sp-breadcrumb { max-width: none; }
    .endoo-toolbar { top: .8rem; right: 0; }
    .endoo-toolbar a, .endoo-toolbar button { padding: 4px 7px; font-size: .68rem; }
    .endoo-toolbar svg { width: 13px; height: 13px; }
    .endoo-hero-search { padding-left: .8rem; }
    .endoo-hero-search .endoo-btn { padding: .55rem .8rem; }
    .endoo-main { margin-top: -2rem; padding: 0 .75rem; }
    .endoo-app-card { padding: 1.25rem; }
}

@media print {
    .endoo-main { margin-top: 0; }
    .endoo-body .sp-content-inner { border: 0; box-shadow: none; }
}
