/* ==========================================================================
   WHOIS.PHP STYLES
   ========================================================================== */

@import url('/styles/shared.css');

/* Search Form */
.search-form-container {
    padding: 2rem;
}

.whois-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.secondary-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 1rem;
}

.secondary-btn:hover {
    background: #4b5563;
}

.input-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Results Container */
.results-container {
    padding: 2rem;
    min-height: 200px;
}

/* Placeholder Message */
.placeholder-message {
    text-align: center;
    color: #6b7280;
    padding: 3rem 1rem;
}

.placeholder-message p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.placeholder-message small {
    font-size: 0.9rem;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-content h4 {
    color: #374151;
    margin-bottom: 1rem;
}

.examples {
    margin-top: 1.5rem;
    text-align: left;
}

.examples ul {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.examples li {
    padding: 0.25rem 0;
    color: #6b7280;
}

/* Success Message */
.whois-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.availability-alert {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #ecfeff;
    border: 1px solid #67e8f9;
    align-items: center;
}

.availability-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.availability-content h4 {
    margin: 0 0 0.25rem 0;
    color: #0f766e;
    font-size: 1.1rem;
}

.availability-content p {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
}

.availability-content small {
    display: block;
    margin-top: 0.35rem;
    color: #0e7490;
}

.success-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.success-content h4 {
    margin: 0 0 0.5rem 0;
    color: #15803d;
}

.success-content p {
    margin: 0;
    color: #15803d;
}

.success-content small {
    color: #16a34a;
    font-size: 0.85rem;
}

.success-content a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
}

.success-content a:hover {
    text-decoration: underline;
}

.whois-new-search-link {
    color: #16a34a;
}

/* WHOIS Data Container */
.whois-data-container {
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.whois-data {
    color: #e5e7eb;
    padding: 1.5rem;
    margin: 0;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 600px;
    overflow-y: auto;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.info-item h4 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* WHOIS Examples */
.example-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.example-link {
    display: block;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
}

.example-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* URL Hint */
.url-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.url-hint code {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.6rem 0.8rem;
    background: #111827;
    color: #f9fafb;
    border-radius: 8px;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
}

/* IP Section Modern */
.ultimate-ip-wrapper {
    max-width: 1000px;
    margin: 2em auto;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
}

.ip-section-modern {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ip-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online { background: #10b981; }
.status-offline { background: #ef4444; }
.status-loading { background: #f59e0b; }
.status-disabled { background: #6b7280; }

/* API Status Styles */
.api-status {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.status-online {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.status-dot-online {
    background: #28a745;
    animation: pulse 2s infinite;
}

.status-dot-offline {
    background: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.servers-status-container {
    margin-top: 15px;
}

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

.server-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
}

.server-status-item.online {
    border-left-color: #28a745;
}

.server-status-item.offline {
    border-left-color: #dc3545;
}

.server-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.server-status-indicator.online {
    background-color: #28a745;
}

.server-status-indicator.offline {
    background-color: #dc3545;
}

.server-name {
    font-weight: 500;
    color: #374151;
}

.server-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.server-status {
    font-size: 0.8em;
    font-weight: 500;
}

.status-text-online {
    color: #28a745;
}

.status-text-offline {
    color: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Result Title in ip-header-modern (white text on gradient) */
.ip-header-modern .result-title {
    color: #ffffff;
}

/* Result Actions */
.result-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Copy All Button */
.copy-all-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s ease;
}

.copy-all-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Cache Badge */
.cache-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* History Styles */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.history-item.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.history-item.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.history-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-query {
    flex: 1;
}

.history-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Monaco', 'Consolas', monospace;
    word-break: break-word;
    white-space: normal;
}

.history-link:hover {
    color: #3b82f6;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.history-status {
    font-weight: 500;
}

.history-time {
    color: #6b7280;
}

.history-info {
    margin-top: 1rem;
    padding: 0.5rem;
    text-align: center;
    background: #f8fafc;
    border-radius: 6px;
}

.history-info small {
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .search-form-container {
        padding: 1rem;
    }
    
    .whois-form {
        max-width: 100%;
    }
    
    .results-container {
        padding: 1.25rem;
    }
    
    .whois-success {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .result-actions {
        margin-left: 0;
        margin-top: 0.5rem;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    .copy-all-btn {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    .cache-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .search-form-container {
        padding: 0.85rem;
    }
    
    .result-title {
        font-size: 1.1rem;
    }
    
    .cache-badge {
        margin-bottom: 0.25rem;
    }
    
    .copy-all-btn {
        width: 100%;
        justify-content: center;
    }
    
    .url-hint code {
        font-size: 0.85rem;
        padding: 0.5rem 0.65rem;
    }
}

