
/* =========================================
   WETENSKAP APPLICATION STYLES
========================================= */

#wetenskap-app {

    --ws-primary: #315c82;
    --ws-primary-dark: #244563;
    --ws-accent: #4c8b9b;

    --ws-background: #f4f6f8;
    --ws-surface: #ffffff;

    --ws-text: #243342;
    --ws-muted: #718096;

    --ws-border: #e0e6ec;

    --ws-success: #21865b;
    --ws-warning: #b7791f;
    --ws-danger: #c53030;

    font-family: Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;

    color: var(--ws-text);

    background: var(--ws-background);

    min-height: 100vh;

    width: 100%;

    box-sizing: border-box;

    line-height: 1.5;

}

#wetenskap-app *,
#wetenskap-app *::before,
#wetenskap-app *::after {

    box-sizing: border-box;

}

#wetenskap-app button,
#wetenskap-app input,
#wetenskap-app textarea {

    font: inherit;

}

/* =========================================
   HEADER
========================================= */

#wetenskap-header {

    background: var(--ws-surface);

    border-bottom: 1px solid var(--ws-border);

    position: sticky;

    top: 0;

    z-index: 100;

}

.ws-header-inner {

    max-width: 1250px;

    margin: auto;

    padding: 15px 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.ws-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    text-decoration: none;

    color: var(--ws-text);

}

.ws-brand-icon {

    width: 42px;

    height: 42px;

    background: var(--ws-primary);

    color: white;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

    font-weight: 800;

}

.ws-brand strong {

    display: block;

    font-size: 15px;

    letter-spacing: 2px;

}

.ws-brand small {

    display: block;

    font-size: 11px;

    color: var(--ws-muted);

}

/* =========================================
   MAIN LAYOUT
========================================= */

#ws-main {

    max-width: 1250px;

    margin: auto;

    padding: 35px 24px 270px;

    min-height: 80vh;

}

#ws-content {

    width: 100%;

}

/* =========================================
   HERO
========================================= */

.ws-hero {

    padding: 45px 35px;

    background: linear-gradient(
        125deg,
        #244563,
        #477f94
    );

    border-radius: 16px;

    color: white;

    margin-bottom: 45px;

}

.ws-eyebrow {

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    opacity: 0.8;

}

.ws-hero h1 {

    font-size: clamp(28px, 4vw, 42px);

    margin: 12px 0;

    line-height: 1.2;

}

.ws-hero p {

    max-width: 600px;

    color: rgba(255,255,255,0.85);

    margin: 0;

    font-size: 15px;

}

/* =========================================
   SECTION HEADINGS
========================================= */

.ws-section-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;

}

.ws-section-heading h2 {

    font-size: 23px;

    margin: 0;

}

.ws-section-heading p {

    color: var(--ws-muted);

    margin: 5px 0 0;

    font-size: 14px;

}

.ws-count {

    font-size: 12px;

    background: #e6eef4;

    color: var(--ws-primary);

    padding: 7px 12px;

    border-radius: 20px;

    white-space: nowrap;

}

/* =========================================
   QUESTIONNAIRE CARDS
========================================= */

.ws-questionnaire-grid {

    display: grid;

    grid-template-columns: repeat(
        auto-fit,
        minmax(250px, 1fr)
    );

    gap: 20px;

}

.ws-card {

    background: var(--ws-surface);

    border: 1px solid var(--ws-border);

    border-radius: 13px;

    padding: 25px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    transition: transform 0.2s, box-shadow 0.2s;

}

.ws-card:hover {

    transform: translateY(-3px);

    box-shadow: 0 8px 25px rgba(30,50,70,0.08);

}

.ws-card-category {

    color: var(--ws-accent);

    background: #edf5f6;

    border-radius: 20px;

    padding: 5px 10px;

    font-size: 11px;

    font-weight: 700;

    margin-bottom: 15px;

}

.ws-card h3 {

    font-size: 19px;

    margin: 0 0 10px;

}

.ws-card p {

    font-size: 14px;

    color: var(--ws-muted);

    margin: 0 0 25px;

    flex-grow: 1;

}

/* =========================================
   BUTTONS
========================================= */

.ws-button {

    border: none;

    border-radius: 8px;

    padding: 11px 17px;

    cursor: pointer;

    font-size: 13px;

    font-weight: 650;

    transition: background 0.2s, opacity 0.2s;

}

.ws-button:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}

.ws-button-primary {

    color: white;

    background: var(--ws-primary);

}

.ws-button-primary:hover {

    background: var(--ws-primary-dark);

}

.ws-button-ghost {

    color: var(--ws-primary);

    background: #edf2f6;

}

.ws-button-ghost:hover {

    background: #e1eaf0;

}

/* =========================================
   QUESTIONNAIRE CONTAINER
========================================= */

.ws-questionnaire-container {

    width: 100%;

    background: var(--ws-surface);

    border: 1px solid var(--ws-border);

    border-radius: 14px;

    padding: 30px;

    min-height: 350px;

}

.ws-questionnaire-container h1,
.ws-questionnaire-container h2,
.ws-questionnaire-container h3 {

    color: var(--ws-text);

}

/* =========================================
   FEEDBACK DOCK
========================================= */

#ws-feedback {

    position: fixed;

    bottom: 0;

    left: 0;

    width: 100%;

    background: var(--ws-surface);

    border-top: 1px solid var(--ws-border);

    box-shadow: 0 -5px 25px rgba(30,50,70,0.08);

    z-index: 200;

    max-height: 255px;

    display: flex;

    flex-direction: column;

}

.ws-feedback-header {

    padding: 12px 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom: 1px solid var(--ws-border);

    flex-shrink: 0;

}

.ws-feedback-header strong {

    display: block;

    font-size: 13px;

}

.ws-feedback-header small {

    display: block;

    font-size: 11px;

    color: var(--ws-muted);

}

#ws-feedback-toggle {

    border: none;

    background: #edf2f6;

    color: var(--ws-primary);

    width: 32px;

    height: 32px;

    border-radius: 7px;

    cursor: pointer;

    font-size: 20px;

}

#ws-feedback-body {

    padding: 12px 24px;

    overflow-y: auto;

    min-height: 0;

}

/* =========================================
   FEEDBACK FORM
========================================= */

#ws-feedback-form {

    display: grid;

    grid-template-columns: 150px minmax(150px, 1fr) auto;

    align-items: center;

    gap: 12px;

    margin-bottom: 12px;

}

#ws-feedback-form label {

    font-size: 12px;

    font-weight: 700;

}

#ws-feedback-message {

    width: 100%;

    resize: vertical;

    min-height: 40px;

    max-height: 90px;

    padding: 9px 12px;

    border: 1px solid var(--ws-border);

    border-radius: 7px;

    font-size: 12px;

}

#ws-feedback-status {

    grid-column: 2 / -1;

    font-size: 11px;

    color: var(--ws-muted);

}

/* =========================================
   RUNNING FEEDBACK LOG
========================================= */

.ws-feedback-log-heading {

    display: flex;

    justify-content: space-between;

    padding: 8px 0;

    border-top: 1px solid var(--ws-border);

    font-size: 11px;

}

.ws-feedback-log-heading span {

    color: var(--ws-muted);

}

#ws-feedback-log {

    display: flex;

    gap: 10px;

    overflow-x: auto;

    padding: 5px 0 10px;

}

.ws-log-entry {

    flex: 0 0 230px;

    padding: 10px;

    background: #f6f8fa;

    border: 1px solid var(--ws-border);

    border-radius: 8px;

    min-width: 0;

}

.ws-log-meta {

    display: flex;

    justify-content: space-between;

    gap: 8px;

    font-size: 10px;

}

.ws-log-meta time {

    color: var(--ws-muted);

}

.ws-log-type {

    margin-top: 5px;

    font-size: 11px;

    font-weight: 700;

    color: var(--ws-primary);

}

.ws-log-entry pre {

    font-family: monospace;

    font-size: 10px;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    max-height: 55px;

    overflow-y: auto;

    color: var(--ws-muted);

}

.ws-log-status {

    font-size: 10px;

    font-weight: 700;

}

.ws-log-status.is-saved {

    color: var(--ws-success);

}

.ws-log-status.is-local {

    color: var(--ws-warning);

}

/* =========================================
   STATES
========================================= */

.ws-loading,
.ws-empty {

    padding: 20px;

    color: var(--ws-muted);

    text-align: center;

    font-size: 13px;

}

.ws-error {

    padding: 35px;

    text-align: center;

    background: white;

    border-radius: 12px;

    border: 1px solid var(--ws-border);

}

.ws-error p {

    color: var(--ws-muted);

}

.ws-hidden {

    display: none !important;

}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 650px) {

    .ws-header-inner {

        padding: 12px 16px;

    }

    #ws-main {

        padding: 22px 15px 290px;

    }

    .ws-hero {

        padding: 30px 22px;

        margin-bottom: 30px;

    }

    .ws-questionnaire-grid {

        grid-template-columns: 1fr;

    }

    .ws-section-heading {

        align-items: flex-start;

    }

    .ws-questionnaire-container {

        padding: 18px;

    }

    #ws-feedback {

        max-height: 275px;

    }

    .ws-feedback-header {

        padding: 10px 15px;

    }

    #ws-feedback-body {

        padding: 10px 15px;

    }

    #ws-feedback-form {

        grid-template-columns: 1fr auto;

        gap: 8px;

    }

    #ws-feedback-form label {

        grid-column: 1 / -1;

    }

    #ws-feedback-form textarea {

        grid-column: 1;

    }

    #ws-feedback-form button {

        grid-column: 2;

    }

    #ws-feedback-status {

        grid-column: 1 / -1;

    }

}

/* =========================================
   WETENSKAP APPLICATION ENTRY
========================================= */

#FS-wetenskap-entry {
    display: flex;
    justify-content: center;
    padding: 12px 20px;
}

#FS-wetenskap-entry a {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 11px 18px;

    border-radius: 9px;

    background: #315c82;
    color: #ffffff;

    text-decoration: none;
    font-size: 13px;
    font-weight: 600;

    transition: background 0.2s;
}

#FS-wetenskap-entry a:hover {
    background: #244563;
}

#FS-wetenskap-entry a span:first-child {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    background: rgba(255,255,255,0.18);
    border-radius: 6px;
}



/* =========================================
   WETENSKAP FLASHCARDS V2
========================================= */

.ws-flashcards {
    max-width: 850px;
    margin: auto;
    padding: 30px 20px 60px;
    color: var(--ws-text, #202938);
}

.ws-flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.ws-flash-header h1 {
    font-size: 34px;
    margin: 8px 0;
}

.ws-flash-header p {
    color: #84909e;
    margin: 0;
}

.ws-flash-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #5278db;
}

.ws-flash-home {
    border: 1px solid #dce1e8;
    background: white;
    border-radius: 9px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 600;
}

.ws-flash-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.ws-flash-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-flash-field label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #84909e;
}

.ws-flash-field select {
    width: 100%;
    padding: 13px;
    border: 1px solid #dce1e8;
    border-radius: 9px;
    background: white;
    font: inherit;
    color: #263244;
}

.ws-flash-mode {
    margin-bottom: 25px;
}

.ws-flash-mode > span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ws-flash-mode-buttons {
    display: flex;
    gap: 9px;
}

.ws-flash-mode-buttons button {
    border: 1px solid #dce1e8;
    background: white;
    border-radius: 9px;
    padding: 12px 19px;
    cursor: pointer;
    font-weight: 650;
}

.ws-flash-mode-buttons button.is-active {
    background: #263f78;
    border-color: #263f78;
    color: white;
}

/* PROGRESS */

.ws-flash-progress {
    margin-bottom: 24px;
}

.ws-flash-progress-info {
    display: flex;
    justify-content: space-between;
    color: #84909e;
    font-size: 13px;
    margin-bottom: 10px;
}

.ws-flash-progress-track {
    height: 7px;
    border-radius: 20px;
    overflow: hidden;
    background: #e9edf3;
}

#ws-flash-progress-bar {
    height: 100%;
    width: 0;
    background: #36a77b;
    border-radius: inherit;
    transition: width .3s ease;
}

/* FLASHCARD */

.ws-flash-stage {
    width: 100%;
}

.ws-flash-card {
    background: white;
    border: 1px solid #e4e9f0;
    border-radius: 22px;
    min-height: 440px;
    padding: 25px;
    box-shadow: 0 15px 45px rgba(25, 40, 65, .08);

    /* Allow vertical scrolling but recognise
       horizontal swipes on the card. */

    touch-action: pan-y;
    user-select: none;
    cursor: pointer;

    transition:
        border-color .2s,
        box-shadow .2s;
}

.ws-flash-card.is-revealed {
    border-color: #a8c4ef;
    box-shadow: 0 15px 45px rgba(50, 90, 150, .12);
}

.ws-flash-card-top,
.ws-flash-card-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #929ba8;
    font-size: 11px;
}

.ws-flash-card-category {
    color: #5278db;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.ws-flash-card-number {
    font-weight: 600;
}

.ws-flash-card-main {
    max-width: 650px;
    margin: 35px auto 25px;
}

.ws-flash-prompt {
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-wrap: anywhere;
    font-size: clamp(25px, 4vw, 37px);
    font-weight: 750;
    line-height: 1.45;
    margin-bottom: 30px;
}

/* ANSWER INPUT */

.ws-flash-input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ws-flash-input-area label {
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 800;
    color: #84909e;
}

.ws-flash-input-area textarea {
    width: 100%;
    min-height: 95px;
    box-sizing: border-box;
    padding: 15px;
    border: 1px solid #dce1e8;
    border-radius: 12px;
    background: #f9fafc;
    resize: vertical;
    font: inherit;
    font-size: 15px;
    line-height: 1.6;
    user-select: text;
    cursor: text;
}

.ws-flash-input-area textarea:focus {
    outline: 2px solid #5278db;
    border-color: transparent;
    background: white;
}

.ws-flash-input-area textarea.is-locked {
    background: #f0f4fa;
    color: #84909e;
}

/* REVEALED ANSWER */

.ws-flash-answer {
    margin-top: 22px;
    padding: 20px;
    background: #edf3ff;
    border-left: 4px solid #5278db;
    border-radius: 10px;
    animation: ws-flash-reveal .25s ease;
    user-select: text;
}

.ws-flash-answer[hidden] {
    display: none;
}

.ws-flash-answer > span {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #5278db;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.ws-flash-answer > div {
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

/* TAP INSTRUCTION */

.ws-flash-tap-hint {
    text-align: center;
    color: #929ba8;
    font-size: 12px;
    margin-top: 25px;
    pointer-events: none;
}

.ws-flash-tap-hint span {
    display: inline-block;
    margin-right: 7px;
    font-size: 17px;
    color: #5278db;
}

.ws-flash-tap-hint.is-revealed {
    color: #21855c;
    font-weight: 700;
}

.ws-flash-tap-hint.is-revealed span {
    color: #21855c;
}

/* SWIPE INSTRUCTIONS */

.ws-flash-swipe-guide {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.ws-flash-guide-left,
.ws-flash-guide-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ws-flash-guide-left > span,
.ws-flash-guide-right > span {
    font-size: 28px;
    font-weight: 700;
}

.ws-flash-guide-left > span {
    color: #d75a5a;
}

.ws-flash-guide-right > span {
    color: #23996c;
}

.ws-flash-guide-left strong,
.ws-flash-guide-right strong {
    display: block;
    font-size: 12px;
}

.ws-flash-guide-left small,
.ws-flash-guide-right small {
    display: block;
    color: #929ba8;
    font-size: 11px;
    margin-top: 3px;
}

/* FOOTER */

.ws-flash-footer {
    text-align: center;
    margin-top: 35px;
    color: #929ba8;
    font-size: 11px;
}

.ws-flash-footer-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #23996c;
    margin-right: 5px;
}

/* COMPLETED */

.ws-flash-complete,
.ws-flash-empty {
    background: white;
    border: 1px solid #e4e9f0;
    border-radius: 22px;
    padding: 60px 25px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(25, 40, 65, .07);
}

.ws-flash-complete-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #e1f5eb;
    color: #21855c;
    font-size: 34px;
}

.ws-flash-complete h2,
.ws-flash-empty h2 {
    font-size: 27px;
}

.ws-flash-complete p,
.ws-flash-empty p {
    color: #84909e;
    line-height: 1.7;
}

.ws-flash-complete-stats {
    display: flex;
    flex-direction: column;
    margin: 30px 0;
}

.ws-flash-complete-stats strong {
    font-size: 48px;
    color: #23996c;
}

.ws-flash-complete-stats span {
    color: #84909e;
    font-size: 13px;
}

.ws-flash-restart {
    border: none;
    border-radius: 10px;
    background: #263f78;
    color: white;
    padding: 15px 25px;
    font-weight: 700;
    cursor: pointer;
}

/* LOADING */

.ws-flash-loading {
    text-align: center;
    padding: 80px 20px;
    color: #84909e;
}

/* ANIMATION */

@keyframes ws-flash-reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE */

@media (max-width: 600px) {

    .ws-flashcards {
        padding: 20px 12px 40px;
    }

    .ws-flash-header {
        align-items: flex-start;
    }

    .ws-flash-header h1 {
        font-size: 28px;
    }

    .ws-flash-settings {
        grid-template-columns: 1fr;
    }

    .ws-flash-card {
        min-height: 400px;
        padding: 19px;
        border-radius: 17px;
    }

    .ws-flash-card-main {
        margin: 30px auto 25px;
    }

    .ws-flash-prompt {
        min-height: 90px;
        font-size: 26px;
    }

    .ws-flash-mode-buttons button {
        flex: 1;
        padding: 12px 8px;
        font-size: 12px;
    }

    .ws-flash-swipe-guide {
        gap: 5px;
    }

    .ws-flash-guide-left,
    .ws-flash-guide-right {
        gap: 6px;
    }

    .ws-flash-guide-left strong,
    .ws-flash-guide-right strong {
        font-size: 11px;
    }

    .ws-flash-guide-left small,
    .ws-flash-guide-right small {
        font-size: 10px;
    }

}
