/* ================================================================
   endoo Support-Tools plugin – status card + compact link strips.
   Builds on the "endoo" frontend template (endoo.css tokens); every
   token has a fallback.
   ================================================================ */

/* ── Dashboard: status card ─────────────────────────────────────── */
.endoo-support-dashboard { margin-top: 1.5rem; }
.endoo-status {
    background: var(--endoo-surface, #fff);
    border: 1px solid var(--endoo-gray-200, #e2e6ea);
    border-left: 4px solid var(--endoo-gray-300, #cdd3d9);
    border-radius: var(--endoo-radius, 10px);
    box-shadow: var(--endoo-shadow-md, 0 4px 12px rgba(0,0,0,.07));
    padding: 1rem 1.25rem;
}
.endoo-status--up { border-left-color: var(--endoo-green, #28a866); }
.endoo-status--warning { border-left-color: var(--endoo-orange, #e0892e); }
.endoo-status--down { border-left-color: var(--endoo-red, #d94848); }
.endoo-status-main { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.endoo-status-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 180px; }
.endoo-status-kicker { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--endoo-gray-500, #8a929a); }
.endoo-status-text strong { font-size: 1rem; font-weight: 600; }
.endoo-status-groups {
    list-style: none;
    margin: .9rem 0 0;
    padding: .8rem 0 0;
    border-top: 1px solid var(--endoo-gray-200, #e2e6ea);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.4rem;
}
.endoo-status-group { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--color-text-secondary, #5f6770); }
.endoo-status-group .endoo-status-dot { width: 8px; height: 8px; box-shadow: none; }
.endoo-status-group small { color: var(--endoo-red, #d94848); font-weight: 600; }
.endoo-status-group--warning small { color: var(--endoo-orange, #e0892e); }
.endoo-status-notice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: .9rem;
    padding: .65rem .85rem;
    border-radius: var(--endoo-radius-sm, 6px);
    font-size: .83rem;
    line-height: 1.45;
    text-decoration: none !important;
    background: var(--endoo-blue-bg, #e8f1fa);
    color: var(--endoo-blue, #1a5fa8) !important;
}
.endoo-status-notice i { margin-top: .15rem; }
.endoo-status-notice--warning, .endoo-status-notice--scheduled { background: var(--endoo-orange-bg, #fef3e2); color: #a35f13 !important; }
.endoo-status-notice--high { background: var(--endoo-red-bg, #fde8e8); color: var(--endoo-red, #d94848) !important; }
.endoo-status-notice--resolved { background: var(--endoo-green-bg, #e6f6ee); color: var(--endoo-primary, #006f3d) !important; }
html.sp-theme-dark .endoo-status-notice { color: #8ab8ea !important; }
html.sp-theme-dark .endoo-status-notice--warning, html.sp-theme-dark .endoo-status-notice--scheduled { color: #f0b46a !important; }
html.sp-theme-dark .endoo-status-notice--high { color: #ef7a7a !important; }
html.sp-theme-dark .endoo-status-notice--resolved { color: #9fdcbb !important; }

/* ── Dashboard: compact link strip (e.g. Crypt) – same frame as the status card ── */
.endoo-strip {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-top: .75rem;
    padding: .85rem 1.25rem;
    background: var(--endoo-surface, #fff);
    border: 1px solid var(--endoo-gray-200, #e2e6ea);
    /* same green as the status card's "up" border */
    border-left: 4px solid var(--endoo-green, #28a866);
    border-radius: var(--endoo-radius, 10px);
    box-shadow: var(--endoo-shadow-md, 0 4px 12px rgba(0,0,0,.07));
    color: inherit !important;
    text-decoration: none !important;
    transition: box-shadow .2s, transform .2s;
}
.endoo-strip:hover { box-shadow: var(--endoo-shadow-lg, 0 10px 30px rgba(0,0,0,.08)); transform: translateY(-1px); }
.endoo-strip-icon {
    width: 34px; height: 34px; flex: none;
    border-radius: 9px;
    background: var(--endoo-primary-light, #e6f6ee);
    color: var(--endoo-primary, #006f3d);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .95rem;
}
html.sp-theme-dark .endoo-strip-icon { color: var(--color-primary-200, #9fdcbb); }
.endoo-strip-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; line-height: 1.35; }
.endoo-strip-text strong { font-size: 1rem; font-weight: 600; }
.endoo-strip-text span { font-size: .84rem; color: var(--color-text-secondary, #5f6770); }
.endoo-strip-btn { flex: none; }
@media (max-width: 640px) {
    .endoo-strip { flex-wrap: wrap; }
    .endoo-strip-btn { width: 100%; justify-content: center; }
}

/* Fallback dots (also defined in endoo.css) */
.endoo-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: #cdd3d9; }
.endoo-status-dot--up { background: #28a866; box-shadow: 0 0 0 4px rgba(40,168,102,.18); }
.endoo-status-dot--warning { background: #e0892e; box-shadow: 0 0 0 4px rgba(224,137,46,.18); }
.endoo-status-dot--down { background: #d94848; box-shadow: 0 0 0 4px rgba(217,72,72,.18); animation: endoo-pulse 1.6s ease-in-out infinite; }
@keyframes endoo-pulse { 50% { box-shadow: 0 0 0 7px rgba(217,72,72,.06); } }
@media (prefers-reduced-motion: reduce) { .endoo-status-dot--down { animation: none; } }

@media (max-width: 640px) {
    .endoo-status-link { width: 100%; justify-content: center; }
}

/* ── Crypt (/crypt) ─────────────────────────────────────────────────── */
/* No max-width: the cards use the full content width like the WiFi tools (domain checker). */
.endoo-crypt .endoo-card + .endoo-card { margin-top: 1.2rem; }
.endoo-crypt-intro { display: block; margin: 0 0 1.1rem; font-size: .82rem; }
.endoo-crypt-gap { margin-top: .9rem; }
.endoo-crypt-alert {
    padding: .7rem .9rem;
    margin-bottom: 1rem;
    border-radius: var(--endoo-radius-sm, 6px);
    font-size: .85rem;
    font-weight: 500;
}
.endoo-crypt-alert--error { background: var(--endoo-red-bg, #fde8e8); color: var(--endoo-red, #d94848); }
.endoo-crypt-alert--info { background: var(--endoo-blue-bg, #e8f1fa); color: var(--endoo-blue, #1a5fa8); }
html.sp-theme-dark .endoo-crypt-alert--error { color: #ef7a7a; }
html.sp-theme-dark .endoo-crypt-alert--info { color: #8ab8ea; }

.endoo-crypt-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: 1rem;
    border-radius: 9px;
    background: var(--endoo-gray-100, #f1f3f5);
    border: 1px solid var(--endoo-gray-200, #e2e6ea);
}
.endoo-crypt-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--endoo-gray-500, #8a929a);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.endoo-crypt-tab:hover { color: var(--endoo-gray-900, #1a1e23); }
.endoo-crypt-tab.is-active { background: var(--endoo-surface, #fff); color: var(--endoo-primary, #006f3d); box-shadow: var(--endoo-shadow-sm); }
html.sp-theme-dark .endoo-crypt-tab.is-active { color: var(--color-primary-200, #9fdcbb); }
.endoo-crypt-pane { margin-bottom: .9rem; }
.endoo-crypt-options { margin-bottom: 1.2rem; }

.endoo-crypt-share { display: flex; gap: 1.5rem; align-items: flex-start; }
.endoo-crypt-share-main { flex: 1; min-width: 0; }
.endoo-crypt-share #crypt-share-url { font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; font-size: .78rem; }
.endoo-crypt-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.endoo-crypt-qr { flex: none; text-align: center; }
.endoo-crypt-qr-label { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--endoo-gray-700, #434a52); margin-bottom: .35rem; }
#crypt-share-qr { background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--endoo-gray-200, #e2e6ea); line-height: 0; }
#crypt-share-qr svg { width: 160px; height: 160px; }
.endoo-crypt-security {
    display: flex;
    gap: .5rem;
    align-items: baseline;
    margin: 1.2rem 0 0;
    padding-top: .9rem;
    border-top: 1px solid var(--endoo-gray-200, #e2e6ea);
    font-size: .78rem;
    color: var(--endoo-gray-500, #8a929a);
}
.endoo-crypt-security i { color: var(--endoo-green, #28a866); }

.endoo-crypt-confirm { max-width: 560px; margin: 0 auto; text-align: center; }
.endoo-crypt-confirm .endoo-card-body { padding: 2.2rem 1.75rem; }
.endoo-crypt-confirm-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    background: var(--endoo-primary-light, #e6f6ee);
    color: var(--endoo-primary, #006f3d);
}
html.sp-theme-dark .endoo-crypt-confirm-icon { color: var(--color-primary-200, #9fdcbb); }
.endoo-crypt-confirm h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .6rem; }
.endoo-crypt-confirm p { margin: 0 0 .6rem; color: var(--color-text-secondary, #5f6770); }
.endoo-crypt-confirm .endoo-btn { margin-top: .8rem; }

.endoo-crypt-file {
    display: flex; align-items: center; gap: .7rem;
    padding: .8rem 1rem;
    border-radius: var(--endoo-radius-sm, 6px);
    background: var(--endoo-gray-50, #f8f9fa);
    border: 1px solid var(--endoo-gray-200, #e2e6ea);
    font-size: .88rem;
    word-break: break-all;
}
.endoo-crypt-file-icon { color: var(--endoo-primary, #006f3d); font-size: 1.2rem; }

@media (max-width: 640px) {
    .endoo-crypt-share { flex-direction: column-reverse; align-items: stretch; }
    .endoo-crypt-actions .endoo-btn { flex: 1 1 100%; justify-content: center; }
}
