/* ===== Equation Detail Page Styles ===== */

.eq-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* Page Title */
.eq-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: #1f2937;
    line-height: 1.4;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #888;
}
.breadcrumb a {
    color: #555;
    text-decoration: none;
}
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb span { margin: 0 0.35rem; }

/* SVG Display */
.svg-display {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.svg-container {
    display: inline-block;
    max-width: 100%;
}
.svg-container svg {
    max-width: 100%;
    height: auto;
}
.no-svg {
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Action Buttons */
.svg-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.btn {
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
}
.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-secondary:hover { background: #e5e7eb; }

/* Collision Notice */
.collision-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: #92400e;
}

/* Variant Cards */
.variants { margin-bottom: 2rem; }
.variants h3 { margin-bottom: 0.75rem; }
.variant-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.variant-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.variant-card:hover { border-color: #93c5fd; background: #eff6ff; }
.variant-card.active { border-color: #2563eb; background: #dbeafe; }
.variant-eq-text {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.variant-source, .variant-condition {
    font-size: 0.8rem;
    color: #888;
}

/* Substance Details */
.substance-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.substance-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.substance-card h3 { margin: 0 0 0.5rem 0; font-size: 1rem; }
.substance-card ul { list-style: none; padding: 0; margin: 0; }
.substance-card li { padding: 0.25rem 0; font-size: 0.95rem; }
.substance-card code {
    background: #e5e7eb;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Meta Tags */
.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
}
.tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
}
.tag-condition { background: #fef3c7; color: #92400e; }
.tag-type { background: #dbeafe; color: #1e40af; }
.tag-feature { background: #d1fae5; color: #065f46; }
.tag-level { background: #ede9fe; color: #6b21a8; }
.tag-kp { background: #f3f4f6; color: #374151; }

/* Related Equations */
.related-equations { margin-bottom: 2rem; }
.related-equations h3 { margin-bottom: 0.75rem; }
.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.related-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: background 0.15s;
}
.related-card:hover { background: #f3f4f6; }
.related-name { font-size: 0.95rem; }
.related-arrow { color: #9ca3af; }
.browse-all {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
}
.browse-all:hover { text-decoration: underline; }

/* Not Found Page */
.eq-notfound {
    max-width: 560px;
    margin: 3rem auto;
    text-align: center;
    padding: 2rem 1rem;
}
.notfound-icon { font-size: 3rem; margin-bottom: 1rem; }
.eq-notfound h1 { margin-bottom: 0.5rem; }
.notfound-hint { color: #888; margin-bottom: 1.5rem; }
.notfound-hint code {
    background: #f3f4f6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}
.notfound-actions .search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}
.notfound-actions .search-box input {
    padding: 0.55rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 280px;
    max-width: 100%;
}
.alt-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .eq-detail { padding: 1rem 0.75rem 2rem; }
    .svg-display { padding: 1rem 0.5rem; }
    .svg-actions { flex-direction: column; align-items: stretch; }
    .substance-details { grid-template-columns: 1fr; }
    .breadcrumb { font-size: 0.8rem; }
}
