/* Mail Auth Check, wedos.tools
   Layout, hero, formular a fonty (Lato/Orbitron) dodava sablona /css/styles.css.
   Tady jsou jen vysledkove komponenty sladene s Bootstrap vzhledem. */

:root {
    --w-navy: #003a70;
    --w-ok: #198754;
    --w-ok-bg: #e8f5ee;
    --w-soft: #b06e00;
    --w-soft-bg: #fdf2df;
    --w-fail: #dc3545;
    --w-fail-bg: #fceaec;
    --w-muted: #6c757d;
    --w-border: #dee2e6;
    --w-shadow: 0 0.125rem 0.5rem rgba(0, 58, 112, 0.08);
}

/* KRITICKE: hidden atribut musi vyhrat nad display pravidly */
[hidden] { display: none !important; }

/* Progress */
.mac-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--w-border);
    border-radius: 0.5rem;
    box-shadow: var(--w-shadow);
    margin-bottom: 1.5rem;
}
.mac-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--w-border);
    border-top-color: var(--w-navy);
    border-radius: 50%;
    animation: mac-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes mac-spin { to { transform: rotate(360deg); } }
.mac-progress p { margin: 0; color: var(--w-muted); }

/* Error: vzhled Bootstrap alert-danger */
.mac-error {
    padding: 1rem 1.25rem;
    background: var(--w-fail-bg);
    color: #842029;
    border: 1px solid #f1aeb5;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    word-break: break-word;
}

/* Verdict */
.mac-verdict {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--w-border);
    border-left: 6px solid var(--w-border);
    border-radius: 0.5rem;
    box-shadow: var(--w-shadow);
    margin-bottom: 1.25rem;
}
.mac-verdict.ok   { border-left-color: var(--w-ok); }
.mac-verdict.soft { border-left-color: var(--w-soft); }
.mac-verdict.fail { border-left-color: var(--w-fail); }

.mac-verdict-badge {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 999px;
    margin-bottom: 0.9rem;
    color: #fff;
}
.mac-verdict.ok   .mac-verdict-badge { background: var(--w-ok); }
.mac-verdict.soft .mac-verdict-badge { background: var(--w-soft); }
.mac-verdict.fail .mac-verdict-badge { background: var(--w-fail); }

.mac-verdict h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--w-navy);
    word-break: break-word;
}
.mac-verdict p { margin: 0 0 1.1rem; color: var(--w-muted); }

.mac-score { display: flex; align-items: center; gap: 14px; }
.mac-score-bar {
    flex: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}
#mac-score-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.6s ease;
}
#mac-score-fill.ok   { background: var(--w-ok); }
#mac-score-fill.soft { background: var(--w-soft); }
#mac-score-fill.fail { background: var(--w-fail); }
#mac-score-label { font-size: 0.85rem; color: var(--w-muted); white-space: nowrap; font-weight: 700; }

/* Karty SPF / DKIM / DMARC pod sebou */
.mac-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.mac-card {
    background: #fff;
    border: 1px solid var(--w-border);
    border-top: 4px solid var(--w-border);
    border-radius: 0.5rem;
    box-shadow: var(--w-shadow);
    padding: 1.5rem;
}
.mac-card.ok        { border-top-color: var(--w-ok); }
.mac-card.soft      { border-top-color: var(--w-soft); }
.mac-card.fail      { border-top-color: var(--w-fail); }
.mac-card.not_found { border-top-color: var(--w-muted); }

.mac-card h3 { margin: 0 0 0.15rem; font-size: 1.25rem; color: var(--w-navy); }
.mac-card-desc { margin: 0 0 0.9rem; font-size: 0.85rem; color: var(--w-muted); }

.mac-card-status {
    float: right;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}
.mac-card-status.ok        { background: var(--w-ok-bg);   color: var(--w-ok); }
.mac-card-status.soft      { background: var(--w-soft-bg); color: var(--w-soft); }
.mac-card-status.fail      { background: var(--w-fail-bg); color: var(--w-fail); }
.mac-card-status.not_found { background: #e9ecef; color: var(--w-muted); }

.mac-card-detail { font-size: 0.9rem; color: var(--w-muted); margin: 0 0 0.6rem; }
.mac-card-detail.ok-note { color: var(--w-ok); font-weight: 700; }

.mac-code {
    background: #f8f9fa;
    border: 1px solid var(--w-border);
    border-radius: 0.375rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0 0 0.75rem;
}
.mac-code code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--w-navy);
}

/* Issues */
.mac-issue {
    border-top: 1px solid var(--w-border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}
.mac-issue-text { margin: 0 0 0.5rem; font-size: 0.9rem; }

.mac-fix summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}
.mac-fix summary:hover { text-decoration: underline; }
.mac-fix p { font-size: 0.9rem; margin: 0.5rem 0; color: var(--w-muted); }

.mac-copy { position: relative; }
.mac-copy .mac-code { margin-bottom: 0.5rem; padding-right: 110px; }
.mac-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 0.25rem 0.85rem;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 700;
    border: 1px solid var(--w-navy);
    border-radius: 0.375rem;
    background: #fff;
    color: var(--w-navy);
    cursor: pointer;
    transition: all 0.15s;
}
.mac-copy-btn:hover { background: var(--w-navy); color: #fff; }

.mac-kb-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d6efd;
    margin-top: 0.25rem;
}

/* Footer note */
.mac-footer-note {
    font-size: 0.85rem;
    color: var(--w-muted);
    background: #fff;
    border: 1px solid var(--w-border);
    border-radius: 0.5rem;
    box-shadow: var(--w-shadow);
    padding: 1rem 1.4rem;
}
.mac-footer-note p { margin: 0.25rem 0; }
.mac-footer-note a { color: #0d6efd; font-weight: 700; }

/* Navbar: aktivni zalozka */
.navbar .nav-link { padding-bottom: 0.35rem; }
.navbar .nav-link.active {
    border-bottom: 2px solid #fff;
}
.navbar .nav-link.text-white-50:hover { color: #fff !important; }
