﻿/* NIC.GM Production / DNS Diagnostics 07. Uses existing deep-green NIC2 visual language. */
.dns07-card {
    box-sizing: border-box;
    border: 1px solid #d3ded6;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(20, 65, 43, .07);
    padding: 15px 18px;
    margin: 15px 0;
    max-width: 100%;
    color: #23362c;
}
/* The actual card width is synchronized to the existing main table/header in JS. */
.dns07-index, .dns07-domain { width: 100%; max-width: 100%; }
.dns07-server-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    align-items: center;
    width: 100%;
}
.dns07-server-item {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    gap: 5px;
    font-size: 11px;
    white-space: nowrap;
}
.dns07-server-name { color: #243c2e; font-weight: 600; }
.dns07-server-state { display:inline-flex; align-items:center; gap:2px; white-space:nowrap; }
.dns07-server-state .dns07-led { margin:0 3px 0 0; width:8px; height:8px; min-width:8px; }
.dns07-server-item + .dns07-server-item { border-left: 1px solid #e4ede7; padding-left: 9px; }
@media (max-width: 690px) {
    .dns07-server-strip { grid-template-columns: 1fr; gap: 6px; }
    .dns07-server-item + .dns07-server-item { border-left: none; padding-left: 0; }
}
.dns07-heading {
    font-size: 14px;
    margin: 0 0 10px 0;
    color: #144d31;
    font-weight: 700;
    letter-spacing: .02em;
}
.dns07-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.dns07-table td { font-size: 13px; padding: 6px 4px; vertical-align: middle; }
.dns07-table tr + tr td { border-top: 1px solid #f0f3f1; }
.dns07-name { text-align: left; overflow-wrap: anywhere; }
.dns07-value { white-space: nowrap; text-align: right; }
.dns07-detail-table .dns07-value { white-space: normal; }
.dns07-led {
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;
    margin: 0 7px 0 0;
    border-radius: 50%;
    vertical-align: baseline;
    background: #8e9690;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.dns07-led--green { background: #288d59; }
.dns07-led--yellow { background: #d0ad30; }
.dns07-led--orange { background: #dd8735; }
.dns07-led--red { background: #cb4848; }
.dns07-led--unknown { background: #8e9690; }
.dns07-foot { margin: 9px 0 0; font-size: 11px; color: #65736c; line-height: 1.5; }
.dns07-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 10px 0; }
.dns07-actions a, .dns07-button { font-size: 12px; }
.dns07-dig-link { text-decoration: underline; color: #24583a; }
.dns07-dig-link:focus-visible, .dns07-button:focus-visible { outline: 2px solid #24583a; outline-offset: 2px; }
.dns07-output { padding-top: 4px; }
.dns07-result { display:flex; align-items:center; gap:6px; font-size:14px; margin: 8px 0; }
.dns07-explanation { margin:5px 0 8px; font-size:13px; line-height:1.4; }
@media(max-width:600px) {
    .dns07-index { width:100%; }
    .dns07-value { white-space:normal; }
    .dns07-card { padding:12px; }
}


/* DNS 07.3 MICROFIX - INDEX ONLY */

/* Less empty space above heading */
.dns07-index.dns07-card {
    padding-top: 7px;
    padding-bottom: 11px;
}

.dns07-index .dns07-heading {
    margin-bottom: 5px;
}

/* Larger, more readable nameserver status */
.dns07-index .dns07-server-item {
    font-size: 13px;
}

/* Match the footer text size */
.dns07-index .dns07-foot {
    font-size: 13px;
    margin-top: 8px;
}

/* DNS 07.5 SLIDE TOGGLE */

/* Both buttons within the main-table width */
#dns075-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    gap: 12px;
    margin-bottom: 12px;
}

#dns075-actions > .cta-button {
    float: none !important;
    margin: 0 !important;
}

#dns074-toggle {
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Hide an asynchronously created card until wrapped */
.dns07-index:not(.dns075-ready) {
    display: none !important;
}

/* Animated slide container */
.dns075-drawer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        grid-template-rows 200ms ease,
        opacity 150ms ease,
        transform 200ms ease,
        visibility 0s linear 200ms;
}

.dns075-clip {
    min-height: 0;
    overflow: hidden;
}

/* Preserve the original white DNS card */
.dns075-clip > .dns07-index {
    display: block !important;
}

/* Expanded state */
.dns075-drawer.dns075-open {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        grid-template-rows 200ms ease,
        opacity 150ms ease,
        transform 200ms ease,
        visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
    .dns075-drawer {
        transition: none;
    }
}

@media (max-width: 480px) {
    #dns075-actions {
        flex-wrap: wrap;
    }
}

/* WHOIS 08A FIX2 */

#domain-actions.whois08-actions {
    display:flex;
    align-items:center;
    justify-content:space-between;
    box-sizing:border-box;
    max-width:100%;
    gap:12px;
    margin:12px 0 8px;
}

.whois08-actions-left {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
}

#domain-actions.whois08-actions .cta-button {
    float:none !important;
    margin:0 !important;
}

#domain-actions.whois08-actions [hidden] {
    display:none !important;
}

#whois08-toggle {
    margin-left:auto !important;
    white-space:nowrap;
    flex-shrink:0;
}

#whois08-drawer {
    margin:0;
    max-width:100%;
}

#whois08-drawer.dns075-open {
    margin-top:8px;
}

#whois08-drawer .dns07-card {
    width:100%;
    max-width:100%;
    margin:0;
}

@media(max-width:480px) {
    #domain-actions.whois08-actions {
        flex-wrap:wrap;
    }
}

/* DNS STATUS PANELS 01 */

/* Common DNS heading */
.dns07-card .dns07-heading {
    font-size: 14px;
    font-weight: 700;
    color: #245338;
    letter-spacing: .025em;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid #dce6de;
}

/* Status colours follow existing DNS LEDs */
.dns07-index .dns07-server-item,
.dns07-domain .dns07-detail-table tr,
.dns07-domain .dns07-result {
    --dns-status-color: #96a49a;
}

.dns07-index .dns07-server-item:has(.dns07-led--green),
.dns07-domain tr:has(.dns07-led--green),
.dns07-domain .dns07-result:has(.dns07-led--green) {
    --dns-status-color: #288d59;
}

.dns07-index .dns07-server-item:has(.dns07-led--yellow),
.dns07-domain tr:has(.dns07-led--yellow),
.dns07-domain .dns07-result:has(.dns07-led--yellow) {
    --dns-status-color: #c29d30;
}

.dns07-index .dns07-server-item:has(.dns07-led--orange),
.dns07-domain tr:has(.dns07-led--orange),
.dns07-domain .dns07-result:has(.dns07-led--orange) {
    --dns-status-color: #d98539;
}

.dns07-index .dns07-server-item:has(.dns07-led--red),
.dns07-domain tr:has(.dns07-led--red),
.dns07-domain .dns07-result:has(.dns07-led--red) {
    --dns-status-color: #cc5550;
}

/* Shared status tile */
.dns07-index .dns07-server-item,
.dns07-domain .dns07-detail-table tr {
    box-sizing: border-box;
    background: #f7faf7;
    border: 1px solid #dce6de;
    border-left: 3px solid var(--dns-status-color);
    border-radius: 4px;
    min-width: 0;
}

/* INDEX: three authoritative nameserver tiles */
.dns07-index .dns07-server-strip {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: stretch;
    gap: 9px;
    width: 100%;
}

.dns07-index .dns07-server-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 11px;
    min-height: 66px;
    white-space: normal;
    font-size: 13px;
}

.dns07-index .dns07-server-item + .dns07-server-item {
    border-left: 3px solid var(--dns-status-color);
    padding-left: 11px;
}

.dns07-index .dns07-server-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    color: #284b36;
    margin-bottom: 6px;
}

.dns07-index .dns07-server-state {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    white-space: normal;
    font-size: 12px;
    line-height: 1.4;
    color: #4b6053;
}

.dns07-index .dns07-foot {
    border-top: 1px solid #e0e8e1;
    margin-top: 12px;
    padding-top: 9px;
    font-size: 12px;
    line-height: 1.45;
}

/* WHOIS: overall DNS status banner */
.dns07-domain .dns07-result {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #eef5ef;
    border: 1px solid #dce6de;
    border-left: 3px solid var(--dns-status-color);
    border-radius: 4px;
    margin: 3px 0 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #254a34;
}

.dns07-domain .dns07-result strong {
    font-size: 14px;
    font-weight: 700;
}

.dns07-domain .dns07-explanation {
    font-size: 12px;
    line-height: 1.5;
    color: #52665a;
    margin: 0 0 13px;
}

/* WHOIS: two status entries per row */
.dns07-domain .dns07-detail-table {
    display: block;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

.dns07-domain .dns07-detail-table tbody {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    width: 100%;
}

.dns07-domain .dns07-detail-table tr {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 66px;
    padding: 10px 12px;
}

.dns07-domain .dns07-detail-table tr:nth-child(odd),
.dns07-domain .dns07-detail-table tr:nth-child(even) {
    padding: 10px 12px;
}

.dns07-domain .dns07-detail-table td {
    display: block;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    min-width: 0;
    width: 100%;
    border: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dns07-domain .dns07-detail-table tr + tr td {
    border-top: none;
}

.dns07-domain .dns07-detail-table .dns07-name {
    color: #284b36;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.dns07-domain .dns07-detail-table .dns07-value {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    line-height: 1.45;
    color: #4a5d50;
}

.dns07-domain .dns07-detail-table .dns07-value .dns07-led {
    flex: 0 0 10px;
    margin: 4px 3px 0 0;
}

.dns07-domain .dns07-detail-table .dns07-value span:not(.dns07-led) {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Technical footer */
.dns07-domain .dns07-output > .dns07-foot {
    border-top: 1px solid #e0e8e1;
    margin-top: 12px;
    padding-top: 9px;
    font-size: 12px;
    line-height: 1.5;
}

/* Narrow screens */
@media (max-width: 900px) {
    .dns07-index .dns07-server-strip,
    .dns07-domain .dns07-detail-table tbody {
        grid-template-columns: 1fr;
    }
}
