/* KIBrillenTest.de - Custom Styles */
/* Complements Tailwind CDN with Chip/Heise-inspired classic look */

/* === Base Typography === */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.3;
    color: #1a3a5c;
}

/* === Article Content (for detail pages) === */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #212529;
}
.article-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}
.article-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.article-content p {
    margin-bottom: 1.25rem;
}
.article-content ul, .article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.35rem;
}
.article-content a {
    color: #1a3a5c;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-content a:hover {
    color: #e67e22;
}
.article-content blockquote {
    border-left: 4px solid #e67e22;
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    background: #fdf3ea;
    font-style: italic;
}
.article-content img {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* === Comparison Table === */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.comparison-table th {
    background: #1a3a5c;
    color: white;
    padding: 1rem;
    text-align: left;
    font-family: Georgia, serif;
    font-weight: normal;
    position: sticky;
    top: 0;
}
.comparison-table th:first-child {
    background: #152e4a;
    min-width: 160px;
}
.comparison-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}
.comparison-table tr:hover td {
    background: #f8f9fa;
}
.comparison-table .winner {
    color: #198754;
    font-weight: 600;
}
.comparison-table .loser {
    color: #dc3545;
}

/* === Glasses Cards === */
.glasses-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
    display: grid !important;
    grid-template-rows: 1fr auto;
    height: 100%;
}
.glasses-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.glasses-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.glasses-card .card-body .card-bottom {
    margin-top: auto;
    padding-top: 0.75rem;
}
.glasses-card .card-actions {
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    display: flex;
    gap: 0.5rem;
}

/* === Rating Stars === */
.rating-stars {
    color: #e67e22;
    font-size: 1.25rem;
    letter-spacing: 2px;
}

/* === Spec Tags === */
.spec-tag {
    display: inline-block;
    background: #eef4f9;
    color: #1a3a5c;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    margin: 0.125rem;
}

/* === Admin Sidebar === */
.admin-sidebar a {
    display: block;
    padding: 0.625rem 1rem;
    color: #e2e8f0;
    border-radius: 0.375rem;
    transition: background 0.15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* === Filter Checkbox/Radio styles === */
.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    cursor: pointer;
}
.filter-group label:hover {
    color: #1a3a5c;
}

/* === Breadcrumbs === */
.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: #1a3a5c;
    text-decoration: underline;
}

/* === Comparison sticky bar === */
.comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #e67e22;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 1rem;
    z-index: 40;
    transform: translateY(100%);
    transition: transform 0.3s;
}
.comparison-bar.active {
    transform: translateY(0);
}

/* === Pulse animation for new items === */
@keyframes pulse-border {
    0%, 100% { border-color: #e67e22; }
    50% { border-color: #f5c79d; }
}
.pulse-new {
    animation: pulse-border 2s ease-in-out infinite;
}

/* === Print styles === */
@media print {
    header, footer, .comparison-bar, .no-print { display: none !important; }
    .comparison-table th { background: #1a3a5c !important; color: white !important; -webkit-print-color-adjust: exact; }
    body { font-size: 11pt; }
}

/* === Toast notification === */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
