/* Extensions for SkyDNS test site (base styles from AuditAI style.css) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Horizontal gutters so cards never touch the screen edges (esp. mobile). */
body {
    padding-left: 16px;
    padding-right: 16px;
}

body.page-scroll {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 24px;
    padding-bottom: 40px;
}

/* Responsive card widths: fluid up to a max, centered by the body flexbox. */
.form-card {
    width: 100%;
    max-width: 480px;
}

.form-card.form-card--wide {
    max-width: 720px;
}

.form-card.form-card--catalog {
    max-width: 920px;
    padding: 32px 36px 36px;
}

/* Keyboard accessibility: visible focus ring on interactive elements. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
    border-radius: 6px;
}

.catalog-heading {
    margin: 28px 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    border-top: 1px solid #e8ecf0;
    padding-top: 24px;
}

.catalog-block {
    margin-bottom: 22px;
}

.catalog-block__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0099ff;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 4px;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    overflow: hidden;
}

.catalog-table th,
.catalog-table td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid #eef1f4;
    vertical-align: middle;
}

.catalog-table tr:last-child td {
    border-bottom: none;
}

.catalog-table th {
    font-weight: 600;
    color: #667;
    background: #f7f9fb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.catalog-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.catalog-table tbody tr {
    transition: background 0.12s;
}

.catalog-table tbody tr:hover {
    background: #f0f7ff;
}

.catalog-table td:first-child {
    width: 52%;
    color: #2a2f36;
}

.catalog-table td:last-child {
    width: 48%;
}

.catalog-domain {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    color: #0099ff !important;
    word-break: break-all;
}

.catalog-domain:hover {
    text-decoration: underline !important;
}

@media (max-width: 600px) {
    .form-card.form-card--catalog {
        padding: 22px 18px 28px;
    }

    .catalog-table {
        border: none;
        border-radius: 0;
    }

    .catalog-table thead {
        display: none;
    }

    .catalog-table,
    .catalog-table tbody,
    .catalog-table tr,
    .catalog-table td {
        display: block;
        width: 100%;
    }

    .catalog-table tr {
        padding: 10px 12px;
        border: 1px solid #eef1f4;
        border-radius: 10px;
        margin-bottom: 8px;
        background: #fafbfc;
    }

    .catalog-table tbody tr:nth-child(even) {
        background: #fafbfc;
    }

    .catalog-table td {
        padding: 2px 0;
        border: none;
    }

    .catalog-table td:first-child {
        font-weight: 600;
        color: #222;
        margin-bottom: 2px;
    }
}

.form-card.form-card--text p,
.form-card.form-card--text li {
    font-size: 15px;
    line-height: 1.55;
    color: #333;
}

.form-card.form-card--text ul,
.form-card.form-card--text ol {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}

.form-card.form-card--text a {
    color: #0099ff;
    text-decoration: none;
}

.form-card.form-card--text a:hover {
    text-decoration: underline;
}

.btn-primary-link {
    display: inline-block;
    width: auto;
    min-width: 220px;
    padding: 12px 24px;
    background: #0099ff;
    border: none;
    border-radius: 8px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-primary-link:hover {
    background: #007acc;
}

.btn-secondary {
    width: auto;
    padding: 8px 14px;
    font-size: 14px;
    margin-right: 8px;
    margin-top: 0;
    background: #fff;
    border: 1px solid #0099ff;
    color: #0099ff;
}

.btn-secondary:hover {
    background: rgba(0, 153, 255, 0.08);
}

.btn-run {
    margin-top: 20px;
}

.ip-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f7ff;
    border: 1px solid #cce8ff;
    border-radius: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 14px;
}

.remediation-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.remediation-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.remediation-list li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: #0099ff;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.block-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 13px 16px;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.block-section:hover {
    border-color: #b9deff;
    background: #f5faff;
}

.block-section__name {
    flex: 1;
    font-weight: 500;
    color: #222;
}

.block-section__count {
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf5ff;
    color: #0077cc;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.block-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0099ff;
    flex-shrink: 0;
}

.block-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

#results {
    margin-top: 24px;
    display: none;
}

#results.visible {
    display: block;
}

.result-summary {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
}

.result-summary.ok {
    background: #e8f8ef;
    color: #1a6b3a;
    border: 1px solid #b8e6c8;
}

.result-summary.warn {
    background: #fff8e6;
    color: #8a6d00;
    border: 1px solid #f0e0a0;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.result-table th,
.result-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e8ecf0;
}

.result-table th {
    font-weight: 600;
    color: #444;
    background: #f5f7fa;
}

.status-ok {
    color: #1a8f4a;
    font-weight: 600;
}

.status-blocked {
    color: #c0392b;
    font-weight: 600;
}

.status-pending {
    color: #888;
}

.progress-line {
    margin: 12px 0;
    font-size: 14px;
    color: #666;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: #0099ff;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}
