/* Enhanced WHOIS-specific styles following spec */
.domain-card {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

body.light-mode .domain-card {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.domain-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.light-mode .domain-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.domain-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #4285f4;
    margin: 0;
}

.domain-tier {
    background: #333;
    color: #4285f4;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

body.light-mode .domain-tier {
    background: #f0f0f0;
}

.tier-tier1 { background: #666 !important; color: #ccc !important; }
.tier-tier2 { background: #ff9800 !important; color: white !important; }
.tier-tier3 { background: #4caf50 !important; color: white !important; }

/* Status indicators per specification */
.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #2a2a2a;
}

body.light-mode .status-indicator {
    border-color: white;
}

.status-ok { background: #4caf50; }           /* Green - no changes */
.status-changed { background: #ff9800; }     /* Yellow/Orange - found changes */
.status-expiring { background: #ff5722; }    /* Orange - expiring within 90 days */
.status-expired { background: #f44336; }     /* Red - domain expired */
.status-pending { background: #2196f3; }     /* Blue - never scanned */
.status-overdue { background: #f44336; }     /* Red - scan overdue */

.domain-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.info-item {
    text-align: center;
}

.info-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

body.light-mode .info-label {
    color: #666;
}

.info-value {
    font-weight: 500;
    color: #e0e0e0;
}

body.light-mode .info-value {
    color: #333;
}

.scan-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-scanning { background: #ff9800; }
.status-completed { background: #4caf50; }
.status-failed { background: #f44336; }
.status-pending { background: #2196f3; }
.status-overdue { background: #f44336; }

/* Expiration status styling */
.expiry-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.expiry-ok { color: #4caf50; }
.expiry-warning { color: #ff9800; }
.expiry-critical { color: #f44336; }
.expiry-expired { color: #f44336; font-weight: 600; }
.expiry-unknown { color: #888; }

/* WHOIS data display */
.whois-data {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
    animation: slideDown 0.3s ease-out;
}

body.light-mode .whois-data {
    border-top: 1px solid #eee;
}

.whois-data.show {
    display: block;
}

.whois-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.whois-field-group {
    background: #333;
    padding: 15px;
    border-radius: 6px;
}

body.light-mode .whois-field-group {
    background: #f9f9f9;
}

.whois-field-group h4 {
    color: #4285f4;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.whois-field {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.whois-field-label {
    color: #888;
    min-width: 120px;
}

body.light-mode .whois-field-label {
    color: #666;
}

.whois-field-value {
    color: #e0e0e0;
    word-break: break-all;
}

body.light-mode .whois-field-value {
    color: #333;
}

.whois-field-value.empty {
    color: #666;
    font-style: italic;
}

body.light-mode .whois-field-value.empty {
    color: #999;
}

/* Nameservers list */
.nameservers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nameservers-list li {
    background: #2a2a2a;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

body.light-mode .nameservers-list li {
    background: #f0f0f0;
}

/* Status list */
.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-list li {
    padding: 4px 8px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 12px;
    background: #2a2a2a;
}

body.light-mode .status-list li {
    background: #f0f0f0;
}

/* Version controls */
.version-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #333;
    border-radius: 6px;
    flex-wrap: wrap;
}

body.light-mode .version-controls {
    background: #f5f5f5;
}

.version-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-select label {
    font-size: 12px;
    color: #ccc;
    margin: 0;
    white-space: nowrap;
}

body.light-mode .version-select label {
    color: #666;
}

.version-select select {
    padding: 4px 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 12px;
    min-width: 200px;
}

body.light-mode .version-select select {
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

.version-badge {
    background: #4285f4;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.version-badge.latest {
    background: #4caf50;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    background: #4285f4;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #3367d6;
}

.btn-small.secondary {
    background: #666;
}

.btn-small.secondary:hover {
    background: #555;
}

/* Changes display */
.compare-versions {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #333;
    border-radius: 6px;
}

body.light-mode .compare-versions {
    background: #f9f9f9;
}

.compare-versions.show {
    display: block;
}

.change-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
}

.change-added {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
}

.change-removed {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.change-modified {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
}

.change-icon {
    font-weight: bold;
    width: 16px;
    text-align: center;
}

.change-added .change-icon { color: #4caf50; }
.change-removed .change-icon { color: #f44336; }
.change-modified .change-icon { color: #ff9800; }

/* Severity indicators */
.severity-info { color: #2196f3; }
.severity-warning { color: #ff9800; }
.severity-critical { color: #f44336; }

.no-domains {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

body.light-mode .no-domains {
    color: #666;
}

.no-domains h3 {
    margin-bottom: 10px;
    color: #666;
}

body.light-mode .no-domains h3 {
    color: #888;
}

/* Frequency indicators per spec */
.frequency-indicator {
    font-size: 11px;
    color: #888;
}

.frequency-tier1::after { content: " (Daily)"; }
.frequency-tier2::after { content: " (Hourly)"; }
.frequency-tier3::after { content: " (10min)"; }

/* Tier notice styling */
.tier-notice {
    font-size: 13px;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.tier-notice strong {
    font-weight: 600;
}

/* Raw WHOIS data display */
.raw-whois {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

body.light-mode .raw-whois {
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #333;
}

.raw-whois-toggle {
    margin-top: 10px;
    text-align: center;
}

.raw-whois-toggle button {
    background: none;
    border: 1px solid #555;
    color: #888;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

body.light-mode .raw-whois-toggle button {
    border-color: #ddd;
    color: #666;
}

.raw-whois-toggle button:hover {
    background: #333;
    color: #e0e0e0;
}

body.light-mode .raw-whois-toggle button:hover {
    background: #f0f0f0;
    color: #333;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .domain-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .whois-fields {
        grid-template-columns: 1fr;
    }
    
    .version-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .whois-field {
        flex-direction: column;
        gap: 4px;
    }
    
    .whois-field-label {
        min-width: auto;
        font-weight: 600;
    }
}