/* SSL Expiry Checker — custom styles */

/* Tool card */
.tool-card {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Input group */
.input-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.input-group input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 0.9375rem;
}

.input-group input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#check-btn {
    padding: 0.6rem 1.25rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

#check-btn:hover:not(:disabled) {
    background: #1d4ed8;
}

#check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Output */
.output {
    display: none;
    margin-top: 1.25rem;
}

.output.show {
    display: block;
}

.output.error {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
}

/* Result grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.result-item {
    background: #f9fafb;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-valid {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef9c3;
    color: #854d0e;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* FAQ answer */
.faq-answer {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
}

/* Related links */
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.related-link svg {
    width: 16px;
    height: 16px;
}

.related-link:hover {
    background: #dbeafe;
}

/* Dark mode */
html[data-theme="dark"] .tool-card {
    background: #1f2937;
    border-color: #374151;
}

html[data-theme="dark"] .input-group input[type="text"] {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .output.error {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}

html[data-theme="dark"] .result-item {
    background: #111827;
    border-color: #374151;
}

html[data-theme="dark"] .result-label {
    color: #9ca3af;
}

html[data-theme="dark"] .result-value {
    color: #f9fafb;
}

html[data-theme="dark"] .status-valid {
    background: #052e16;
    color: #86efac;
}

html[data-theme="dark"] .status-warning {
    background: #422006;
    color: #fde68a;
}

html[data-theme="dark"] .status-expired {
    background: #450a0a;
    color: #fca5a5;
}

html[data-theme="dark"] .faq-answer {
    color: #d1d5db;
}

html[data-theme="dark"] .related-link {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}
