/* DooDevel DNS Stylesheet */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #333333;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

a {
    color: #006699;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 15px;
}

/* Top Navigation (Language selector) */
.top-nav {
    background-color: #fafafa;
    border-bottom: 1px solid #eeeeee;
    padding: 5px 0;
    font-size: 10px;
}

.nav-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 15px;
}

.lang-wrapper select {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    padding: 2px 5px;
    border: 1px solid #cccccc;
    background-color: #ffffff;
    cursor: pointer;
}

/* Header */
.header-wrapper {
    border-bottom: 1px solid #dcdcdc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 15px;
}

.logo-link {
    display: inline-block;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
}

.search-form input[type="text"] {
    width: 250px;
    height: 22px;
    border: 1px solid #7f9db9;
    padding: 2px 5px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin-right: 5px;
}

.search-form button {
    height: 28px;
    padding: 0 12px;
    background-color: #5b9bd5;
    border: 1px solid #41719c;
    color: #ffffff;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.search-form button:hover {
    background-color: #41719c;
}

/* Home Page Specific Layout */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.home-logo {
    margin-bottom: 25px;
    max-width: 100%;
    padding: 0 10px;
}

.home-logo img {
    max-width: 100%;
    height: auto;
}

.home-search {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 15px;
}

.home-search .search-form {
    width: 100%;
    max-width: 450px;
}

.home-search input[type="text"] {
    flex-grow: 1;
    width: 100%;
    height: 26px;
    font-size: 14px;
}

.home-search button {
    height: 32px;
    font-size: 12px;
}

.home-description {
    width: 100%;
    max-width: 600px;
    font-size: 12px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 40px;
    padding: 0 15px;
}

/* Main Report Table */
#report-results {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border: 1px solid #dcdcdc;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin-bottom: 0;
    min-width: 650px;
}

.report-table th {
    background-color: #e2ebf5;
    color: #333333;
    font-weight: bold;
    text-align: left;
    padding: 6px 10px;
    font-size: 11px;
    border-bottom: 1px solid #dcdcdc;
}

.report-table td {
    padding: 8px 10px;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

/* Row Categories */
.category-cell {
    font-weight: bold;
    color: #333333;
    width: 80px;
    border-right: 1px solid #dcdcdc;
    background-color: #fafafa;
}

/* Status Icons */
.status-cell {
    width: 30px;
    text-align: center;
}

.status-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-weight: bold;
    font-size: 11px;
    color: #ffffff;
}

.status-icon.ok {
    background-color: #2ea44f;
}
.status-icon.ok::before {
    content: "✓";
}

.status-icon.info {
    background-color: #2d7bb4;
}
.status-icon.info::before {
    content: "i";
    font-family: "Georgia", serif;
    font-style: italic;
}

.status-icon.warn {
    background-color: #eab308;
}
.status-icon.warn::before {
    content: "!";
}

.status-icon.error {
    background-color: #d9383a;
}
.status-icon.error::before {
    content: "×";
}

/* Test Name column */
.test-name-cell {
    width: 180px;
    font-weight: bold;
    color: #333333;
}

/* Information column */
.info-cell {
    color: #333333;
}

/* Warnings and Highlighted Rows */
.row-warn {
    background-color: #ffffcc !important;
}

.row-error {
    background-color: #ffe6e6 !important;
}

/* Monospaced segments for DNS records */
.dns-output {
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    background-color: #fafafa;
    border: 1px solid #eeeeee;
    padding: 8px;
    margin: 5px 0;
    white-space: pre-wrap;
    line-height: 1.4;
    text-align: left; /* Keep DNS records left-to-right even in RTL */
    direction: ltr;  /* Keep DNS records left-to-right even in RTL */
}

/* Timing info */
.timing-info {
    text-align: center;
    font-size: 10px;
    color: #777777;
    margin-bottom: 20px;
}

/* Footer style */
.footer-line {
    border-top: 1px solid #dcdcdc;
    margin-top: 15px;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #777777;
}

.footer-line a {
    color: #777777;
    text-decoration: underline;
}

/* Loader */
.loader-container {
    text-align: center;
    padding: 50px 0;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2d7bb4;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   RTL (Right-To-Left) Layout Support (for Arabic)
   ------------------------------------------------------------- */
body[dir="rtl"] {
    text-align: right;
}

body[dir="rtl"] .nav-container {
    justify-content: flex-start;
}

body[dir="rtl"] .search-form input[type="text"] {
    margin-right: 0;
    margin-left: 5px;
}

body[dir="rtl"] .report-table th {
    text-align: right;
}

body[dir="rtl"] .report-table th span[style*="float: right"] {
    float: left !important;
}

body[dir="rtl"] .category-cell {
    border-right: none;
    border-left: 1px solid #dcdcdc;
}

body[dir="rtl"] .footer-line {
    flex-direction: row-reverse;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .search-form {
        width: 100%;
        justify-content: center;
    }
    .search-form input[type="text"] {
        width: 70%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 8px 0;
    }
    .nav-container {
        justify-content: center;
    }
    .footer-line {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
    body[dir="rtl"] .footer-line {
        flex-direction: column;
    }
}
