/* Add these to your existing style.css */

.serial-number {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}

.server-name {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #7f8c8d;
}

.country-flag {
    display: inline-block;
    width: 32px;
    height: 20px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.05);
}

.country-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-name {
    font-size: 0.95em;
    color: var(--muted-foreground);
}

/* Make the table more compact */
table {
    font-size: 0.9em;
}

th, td {
    padding: 10px 8px;
}

/* Highlight different serial numbers */
.serial-mismatch {
    background: #fff3cd !important;
    color: #856404;
    font-weight: bold;
} 

/* Layout overrides to match SubnetPlanner look */
.container {
    max-width: 980px;
    margin: 32px auto;
    padding: 24px;
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    box-shadow: var(--shadow-sm);
}

/* header/footer removed to match SubnetPlanner layout */

/* Modal styles */
.modal { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; z-index: 2000; }
.modal[aria-hidden="false"] { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-content { position: relative; width: 820px; max-width: calc(100% - 40px); background: var(--card); color: var(--card-foreground); border-radius: 8px; padding: 20px; box-shadow: var(--shadow-lg); z-index: 3; }
.modal-close { position: absolute; right: 12px; top: 8px; border: none; background: transparent; font-size: 22px; cursor: pointer; }

.server-name a.server-link { color: var(--muted-foreground); text-decoration: none; font-family: var(--font-mono); }
.server-name a.server-link:hover { text-decoration: underline; color: var(--foreground); }

h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.search-box {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0 18px 0;
}

input#domainInput {
    flex: 1 1 420px;
    padding: 8px 10px;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 6px);
    height: 42px; /* Fixed height to match button */
    box-sizing: border-box;
}

select#recordType {
    padding: 0 16px;
    border: 1px solid var(--input);
    border-radius: 6px;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-mono);
    height: 42px; /* Match button height */
    cursor: pointer;
    box-sizing: border-box;
}

/* New Layout Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Geist Mono', monospace; /* Apply Geist Mono globally */
}

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 20%;
    min-width: 250px;
    position: relative;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.sidebar-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%);
}

.sidebar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
    z-index: 10;
    pointer-events: none;
}

.sidebar-overlay h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.sidebar-overlay p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    font-family: var(--font-mono);
    line-height: 1.4;
}

.main-content {
    flex: 1;
    background-color: var(--background);
    overflow-y: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo Styles */
.logo-container {
    margin-bottom: 24px;
    text-align: left; /* Align with the rest of the content */
}

.app-logo {
    height: 60px; /* Adjust size as needed */
    width: auto;
}

/* Override container for new layout */
.container {
    width: 100%;
    max-width: 1000px;
    padding: 32px;
    border: none;
    box-shadow: none;
    background: transparent;
}

.main-content {
    flex: 1;
    background-color: var(--background);
    overflow-y: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Styles */
.btn-check {
    background-color: #f15a24;
    color: white;
    border: none;
    padding: 0 24px; /* Remove vertical padding, use height */
    height: 42px; /* Fixed height */
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading Styles */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--muted-foreground);
}

.loading-icon {
    width: 48px;
    height: 48px;
    color: #f15a24;
    animation: spin 2s linear infinite;
    margin-bottom: 16px;
}

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

/* Table Styles */
.results-table {
    border: 1px solid #f15a24;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 24px;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

th {
    background-color: #fff;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 16px;
    border-bottom: 2px solid #f0f0f0;
    text-align: left;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Status Tags */
.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-success {
    background-color: #e6f4ea;
    color: #1e7e34;
}

.status-error {
    background-color: #fce8e6;
    color: #c5221f;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--foreground);
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.page-btn.active {
    background-color: #f15a24;
    color: white;
    border-color: #f15a24;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.rows-per-page select {
    padding: 4px 8px;
    border: 1px solid var(--input);
    border-radius: 4px;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-mono);
    cursor: pointer;
}

/* Update Pagination to remove border and padding as it's now in footer */
.pagination {
    border-top: none;
    padding: 0;
    background: transparent;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th {
    text-align: left;
    color: var(--muted-foreground);
    font-weight: 700;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 10px 8px;
    border-bottom: 1px dashed var(--border);
}

.status-success { color: green; }
.status-error { color: var(--destructive); }
.status-timeout { color: #d97706; }
