/*
 * LabKlas Scoretools - Shared CSS
 * Gemeenschappelijke styling voor alle scoretools
 * Gebaseerd op scoretool-dokter-prik.html
 */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #0f172a;
    color: #f8fafc;
    padding: 2rem 1rem;
    line-height: 1.6;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    height: 80px;
    filter: brightness(0) invert(1);
}

/* Layout */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    display: grid;
    gap: 1.5rem;
}

/* Cards */
.card {
    background: #1e2538;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1.5rem;
}

/* Typography */
h1 {
    color: #38bdf8;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

h2 {
    color: #38bdf8;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 {
    color: #f8fafc;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #94a3b8;
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: #38bdf8;
}

select {
    cursor: pointer;
}

select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Score Display - Sticky Sidebar */
.score-display {
    position: sticky;
    top: 2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    height: fit-content;
}

.score-display h2 {
    color: #fff;
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    justify-content: center;
}

.score-number {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0.5rem 0;
}

.score-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.score-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* Criterion Section */
.criterion {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.criterion-title {
    flex: 1;
}

.criterion-title h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.criterion-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.criterion-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.criterion-score {
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Score Buttons */
.score-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.score-buttons.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.score-btn {
    height: 60px;
    border: 2px solid #334155;
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.score-btn:hover {
    transform: translateY(-2px);
    border-color: currentColor;
}

.score-btn.active {
    border-width: 3px;
    transform: scale(1.05);
}

.score-btn[data-score="0"] {
    color: #ef4444;
}

.score-btn[data-score="0"].active {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.score-btn[data-score="1"] {
    color: #f59e0b;
}

.score-btn[data-score="1"].active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
}

.score-btn[data-score="2"] {
    color: #38bdf8;
}

.score-btn[data-score="2"].active {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

.score-btn[data-score="3"] {
    color: #10b981;
}

.score-btn[data-score="3"].active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.score-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid #38bdf8;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.section-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: #38bdf8;
}

/* Bonus Section (for tools that need it) */
.bonus-section {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.bonus-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.bonus-section.active {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
}

.bonus-section h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.bonus-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.bonus-indicator {
    font-size: 2rem;
    margin-top: 0.5rem;
}

/* Feedback Section */
.feedback-output {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.25rem;
    min-height: 150px;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #38bdf8;
    color: #0a0f1e;
}

.btn-primary:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f59e0b;
    color: #0a0f1e;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #475569;
    color: #fff;
}

.btn-secondary:hover {
    background: #334155;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Footer */
footer {
    background: #1e2538;
    border-top: 1px solid #334155;
    padding: 1.5rem;
    text-align: center;
    margin-top: 3rem;
    border-radius: 10px;
}

footer p {
    color: #94a3b8;
    font-size: 0.9rem;
}

footer a {
    color: #38bdf8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        grid-template-columns: 1fr;
        max-width: 900px;
    }

    .score-display {
        position: static;
        margin-bottom: 1.5rem;
    }

    body {
        padding: 1rem;
    }

    .logo-container img {
        height: 60px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .score-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .score-buttons.three-col {
        grid-template-columns: repeat(3, 1fr);
    }

    .score-btn {
        height: 50px;
        font-size: 1.25rem;
    }

    .score-label {
        font-size: 0.6rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .criterion-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}
