html, body {
    scroll-behavior: smooth;
    height: 100%;
    margin: 0;
}
.story {
    margin-bottom: 0.5em;
}

#preview {
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 10px;
    min-height: 100px;
}


.sticky-nav {
    position: sticky;
    top: 0;
    background-color: #1a2334; /* Achtergrondkleur van de navigatiebalk */
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    z-index: 1000;
    border-bottom: 0.4em solid #688da6; /* Toevoegen van de lichtgrijze streep onderaan */
    border-bottom-right-radius: 40%;
}

#right-radius {
    border-bottom-right-radius: 40%;
}



.nounderline { /* No underline with a text */
    text-decoration: none;
    color: black;
}

.wrong {
    color: deeppink;
}

.wrong .fa-check {
    display: none;
}

.good {
    color: green;
}

.good .fa-times {
    display: none;
}

.valid-feedback,
.invalid-feedback {
    margin-left: calc(2em + 0.25rem + 1.5rem);
}

.nav-logo {
    font-size: 24px;
    color: #fff; /* Kleur van het logo */
}

.nav-logo a {
    text-decoration: none;
    color: #d2d3d2;
}

.nav-buttons {
    margin-left: auto;
}


/* Aangepaste CSS voor de sticky footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #1a2334; /* Achtergrondkleur van de footer */
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    z-index: 1000;
    border-top: 0.2em solid #688da6; /* Lichtgrijze bovenrand */
    border-top-right-radius: 40%;
}

.modal-backdrop {
    z-index: 50;
}

/* iOS: voorkom automatisch inzoomen op focus (inputs min. ~16px) */
@media screen and (max-width: 576px) {
    input.form-control,
    select.form-select,
    textarea.form-control,
    .form-select:not(.form-select-sm) {
        font-size: max(16px, 1rem);
    }
    .form-floating > .form-control,
    .form-floating > .form-select {
        font-size: max(16px, 1rem);
    }
    /* Header settings: kleine selects mogen compact blijven op smalle schermen zonder zoom-probleem (touch) */
    #settingsAccountDropdownMenu .form-select-sm {
        font-size: max(16px, 0.8125rem);
        min-height: 44px;
    }
    .header-lang-toggle--nav .header-lang-btn {
        font-size: max(15px, 0.8125rem);
        min-height: 40px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.form-control .TextSection 
{
    padding: 15px;
    border: 1px solid #90caf9; /* Blauw */
    border-radius: 5px;
    max-width: 100%; /* Zorgt ervoor dat de container niet breder wordt dan de beschikbare ruimte */
    overflow-wrap: break-word; /* Breekt woorden correct af */
    white-space: normal; /* Zorgt ervoor dat tekst niet buiten de container springt */
}

textarea.TextSection {
    padding: 15px;
    border: 1px solid #90caf9;
    border-radius: 5px;
    max-width: 100%;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: 150px;
    resize: vertical;
}

.TextArea {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.SideArea {
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
}

/* Profile Card Styles */
.profile-card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.profile-picture-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #688da6;
    transition: transform 0.3s ease;
}

.profile-picture-preview:hover {
    transform: scale(1.05);
}

.profile-picture-header {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #688da6;
    transition: transform 0.3s ease;
}

.profile-picture-preview:hover {
    transform: scale(1.05);
}

.profile-picture-placeholder {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #688da6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert {
    animation: fadeInUp 0.5s ease-out;
}

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.container {
    animation: fadeInUp 0.6s ease-out;
}

/* Title Card Styles */
.title-card {
    border-radius: 15px;
    border: 2px solid #688da6;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.title-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    border-color: #90caf9;
}

.title-card h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

@media screen and (max-width: 800px) {
    .btn-group {
        flex-wrap: wrap;
    }
    
    .TextArea, .SideArea {
        padding: 10px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .story {
      padding: 0.75em !important
    }
}

/* Improved SideArea (profile card) visuals */
.SideArea {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(245,247,250,0.9));
    border-radius: 12px;
    padding: 18px;
    margin-left: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(220, 220, 220, 0.5);
    position: relative;
}

.SideArea .profile-pic-small {
    width: 64px !important;
    height: 64px !important;
    border-radius: 999px !important;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Author tier badge styling */
.SideArea p {
    margin-bottom: 10px;
    width: 100%;
}

.SideArea strong {
    display: block;
    font-size: 1.05em;
    color: #2c3e50;
    margin-bottom: 6px;
}

.SideArea small {
    display: block;
    margin-bottom: 4px;
    color: #555;
}

.SideArea .tier-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    white-space: nowrap;
}

.side-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,247,250,0.95));
    border-radius: 10px;
    padding: 16px;
    margin-left: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(220, 220, 220, 0.5);
}

.side-card .meta {
    text-align: center;
    width: 100%;
}

.side-card .meta strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.side-card .meta small {
    display: block;
    color: #556; 
    font-size: 0.82rem;
}

.side-card .btn {
    width: 100%;
}

.side-card .note {
    border-radius: 6px;
    padding: 8px;
    font-size: 0.9rem;
    color: #334;
}

/* Modern Header Navigation Buttons */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-text {
    font-size: 0.95rem;
    margin-right: 10px;
    white-space: nowrap;
    text-decoration: none;
}
.nav-link {
    color: #d2d3d2;
    transition: color 0.3s ease;
    text-decoration: none;
}
.nav-link:hover {
    color: #fff;    
}
.nav-buttons .btn {
    padding: 8px 16px;
    font-size: 0.95rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modern Footer Styling */
.sticky-footer {
    padding: 8px 0 !important;
    min-height: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 10px;
}

.footer-content .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.footer-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-content p {
    margin: 0;
    font-size: 0.75rem;
    color: #a0a0a0;
}

.footer-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .navbar-text {
        font-size: 0.85rem;
        margin-right: 5px;
    }
    
    .nav-buttons .btn {
        padding: 8px 12px;
        min-height: 44px;
        font-size: 0.85rem;
    }
    
    .footer-content {
        gap: 6px;
        padding: 6px 5px;
    }
    
    .footer-content .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .footer-divider {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .nav-buttons {
        gap: 4px;
    }
    
    .nav-buttons .btn {
        padding: 8px 10px;
        min-height: 44px;
        font-size: 0.75rem;
    }
    
    .navbar-text {
        font-size: 0.75rem;
        margin-right: 0;
    }
    
    .footer-content {
        gap: 4px;
        padding: 6px 4px;
    }
    
    .footer-content .btn {
        padding: 8px 10px;
        min-height: 44px;
        font-size: 0.75rem;
    }
}



/* --- UX Improvements: Contrast, Typography, Buttons, Footer/Header behavior --- */

:root {
    --story-surface: #fbf6e1;
    --story-text: #2f2f2f;
    --story-heading: #2c3e50;
    --story-meta: #666;
    --story-meta-soft: #999;
    --story-border: #e6dcc2;
    --story-border-soft: rgba(200, 200, 200, 0.2);
    --spiral-odd-bg: rgba(255, 255, 255, 0.3);
    --spiral-even-bg: rgba(248, 246, 238, 0.4);
    --star-rating: #ff9800;
}

/* Story content: light parchment background and dark-grey text, serif font */
.TextSection,
.TextArea,
.story,
.title-card,
.side-card {
    background: var(--story-surface);
    color: var(--story-text);
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    line-height: 1.6;
}

.TextSection,
.TextArea {
    border: 1px solid var(--story-border);
}

/* Full-width story column inside an outer .container (avoids double Bootstrap .container nesting) */
.story-shell {
    width: 100%;
    max-width: 100%;
}

.story-card-title {
    font-weight: bold;
    font-size: 1.8em;
    color: var(--story-heading);
    margin-bottom: 12px;
    margin-top: 0;
}

.story-card-title--sub {
    font-size: 1.6em;
}

.story-completion-note {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 8px 12px;
    border-radius: 3px;
    margin: 8px 0;
}

.spiral-actions-form {
    display: inline;
}

/* Story editor (Story.php): keep editor styles in CSS for dark mode */
.story-rte-editor.rte-editor {
    font-family: 'Merriweather', Georgia, serif;
    min-height: 200px;
    resize: vertical;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
}

.story-editor-section {
    width: 100%;
    max-width: 100%;
}

/* Per-spiral rating (community + your stars) */
.spiral-rating-card {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--story-border-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-left: 4px solid var(--star-rating);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.spiral-rating--readonly {
    border-left-color: #7e9ab8;
    background: rgba(255, 255, 255, 0.25);
}

.spiral-rating-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.spiral-rating-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--story-meta);
}

.spiral-rating-your-vote {
    font-size: 0.72rem;
    font-weight: 600;
    max-width: 100%;
    background: rgba(255, 152, 0, 0.18) !important;
    color: var(--story-heading) !important;
    border: 1px solid rgba(255, 152, 0, 0.35);
}

.spiral-rating-display-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.spiral-rating-stars-static {
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: 1px;
}

.spiral-rating-char {
    color: var(--star-rating);
}

.spiral-rating-meta {
    color: var(--story-meta);
    font-size: 0.8125rem;
}

.spiral-rating-vote-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--story-meta);
    margin-bottom: 4px;
}

.spiral-rating-vote-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.spiral-rating-hint {
    color: var(--story-meta-soft);
    font-size: 0.8125rem;
    margin-top: 4px;
}

.spiral-rating-hint--owner {
    font-style: italic;
}

.spiral-rating--loading {
    opacity: 0.7;
    pointer-events: none;
}

.spiral-rating--just-saved {
    animation: spiral-rating-flash 0.85s ease;
}

@keyframes spiral-rating-flash {
    from {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.45);
    }
    to {
        box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    }
}

.spiral-rating-feedback--error {
    font-size: 0.8125rem;
    color: #c62828;
    margin-top: 8px;
}

.rating-star-char {
    color: var(--star-rating);
}

/* Reduce aggressive gradients on title-card for better focus */
.title-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7f4ee 100%);
}

/* Alerts and section titles: tighter spacing so content appears sooner */
.alert,
.title-card h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Spiral container visual separations and enhancements */
.spiral-container {
    padding: 15px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    position: relative;
    background: transparent;
}

.spiral-container.spiral-odd {
    background-color: var(--spiral-odd-bg);
}

.spiral-container.spiral-even {
    background-color: var(--spiral-even-bg);
}

/* Horizontal author info styling (newspaper style) */
.author-info-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--story-border-soft);
}

.author-pic-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.author-pic-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.author-pic-link:hover {
    transform: scale(1.05);
}

.author-pic-link:hover .author-pic-small {
    border-color: var(--primary-color);
}

.author-pic-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.author-details {
    display: flex;
    gap: 2px;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
}

.author-details strong {
    font-size: 0.95em;
    color: var(--story-heading);
    margin: 0;
}

.author-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.author-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.4);
    white-space: nowrap;
}


.author-tier {
    font-size: 0.8em;
    color: var(--story-meta);
    font-weight: 500;
}

.author-meta {
    font-size: 0.75em;
    color: var(--story-meta-soft);
}

/* Story content wrapper */
.spiral-content {
    padding: 0;
    margin-bottom: 12px;
}

@media screen and (min-width: 768px) {
    .spiral-content {
        max-width: 65ch;
    }
}

.spiral-content p {
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.7;
    overflow-wrap: anywhere; /* force lange ononderbroken tekst te breken in de container */
    word-break: break-word;   /* ondersteunt verschillende browsers */
    white-space: pre-wrap;   /* behoud line breaks, maar breekt in het geval van lange reeksen */
}

/* Spiral actions (buttons, admin tools) */
.spiral-actions {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(200, 200, 200, 0.2);
}

.spiral-actions .btn {
    margin-right: 8px;
    margin-bottom: 6px;
}

.spiral-actions .wrong {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 0.9em;
    margin: 0;
}

.spiral-divider {
    height: 2px;
    background: linear-gradient(to right, rgba(200, 200, 200, 0), rgba(180, 180, 180, 0.4), rgba(200, 200, 200, 0));
    margin: 15px 0 5px 0;
    border-radius: 1px;
}

/* Genre badge styling */
.genre-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Story actions styling */
.story-actions {
    margin-bottom: 12px;
}

/* Spiral counter badge */
.spiral-counter-badge {
    display: inline-block;
    background-color: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 3px;
}

.spiral-counter-badge .spiral-number {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

/* Standardize primary (yellow) and secondary (muted) buttons */
.btn-primary,
.btn-warning {
    background: #ffcf47;
    border-color: #e0b43a;
    color: #1a1a1a;
}
.btn-primary:hover,
.btn-warning:hover {
    background: #f6bf2d;
    border-color: #d6a827;
}

.btn-secondary,
.btn-info {
    background: #e6e6e6;
    border-color: #d0d0d0;
    color: #333333;
}
.btn-secondary:hover,
.btn-info:hover {
    background: #dcdcdc;
}

/* Dedicated 'Go Back' style to be used sitewide */
.btn-back {
    background: #e6e6e6;
    border-color: #cfcfcf;
    color: #333;
}

/* Header nav duplicates for desktop; hidden on small screens */
.header-nav {
    display: none;
}
@media screen and (min-width: 992px) {
    .header-nav { display: flex !important; }
    /* Hide sticky bottom footer on desktop (keep for mobile) */
    .sticky-footer { display: none !important; }
}

@media screen and (max-width: 448px) {
    .nav-logo {
        font-size: clamp(0.875rem, 4.5vw, 1.35rem);
    }
    .nav-logo a {
        font-size: inherit;
    }
}

/* Ensure mobile still shows footer */
@media screen and (max-width: 991px) {
    .header-nav { display: none !important; }
    .sticky-footer { display: block !important; }

    /* Ruimte boven vaste footer + iOS home-indicator (vervangt vaste <br> in footer) */
    main {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    }

    .footer-nav-minimal {
        min-height: 44px;
        padding: 10px 12px;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
    }

    .footer-nav-minimal.btn-action {
        min-height: 44px;
        padding: 10px 14px !important;
    }
    
    /* Responsive author info */
    .author-info-horizontal {
        gap: 10px;
        padding: 8px 0;
    }
    
    .author-pic-small {
        width: 40px;
        height: 40px;
    }
    
    .author-pic-placeholder {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .author-details {
        gap: 1px;
    }
    
    .author-details strong {
        font-size: 0.9em;
    }
    
    .author-tier {
        font-size: 0.75em;
    }
    
    .author-meta {
        font-size: 0.7em;
    }
}

/* ===== Star Rating Styles ===== */
.rating-container {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.rating-stars {
    display: flex;
    gap: 5px;
    font-size: 24px;
}

.rating-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating-average {
    font-size: 18px;
    font-weight: bold;
    color: #ff9800;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

.rating-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-rating {
    display: flex;
    gap: 5px;
    font-size: 28px;
    cursor: pointer;
}

.star-rating .star {
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #ff9800;
    transform: scale(1.2);
}

.star-rating .star.hovered {
    color: #ffb74d;
}

.submit-vote-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.submit-vote-btn:hover {
    background-color: #0056b3;
}

.submit-vote-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.vote-feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.vote-feedback.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.vote-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.vote-feedback.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .rating-container {
        padding: 10px;
        margin: 10px 0;
    }

    .rating-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .star-rating {
        font-size: 24px;
    }
}

/* ===== Top Rated Stories Styles ===== */
.top-stories-container {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.top-stories-container h3 {
    text-align: center;
    margin-bottom: 25px;
    
    font-size: 28px;
    font-weight: bold;
}

.top-rated-card {
    border: 2px solid #ff9800;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.top-rated-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(255, 152, 0, 0.3);
}

.top-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff9800;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.top-rated-card .card-body {
    padding: 20px;
}

.top-rated-card .card-title {
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 10px;
}

.rating-score {
    margin-left: 10px;
    font-weight: bold;
    color: #333;
    vertical-align: middle;
}

/* Spiral vote stars (buttons for accessibility) */
button.spiral-star {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-size: 1.35rem !important;
    line-height: 1;
    color: #cfd0d4 !important;
    background: transparent;
    border: none;
    padding: 2px 4px;
    margin: 0;
    border-radius: 6px;
    transition: color 0.15s ease, transform 0.12s ease, background 0.15s ease;
    user-select: none;
}

button.spiral-star:focus-visible {
    outline: 2px solid #5b8ac5;
    outline-offset: 2px;
}

button.spiral-star:hover,
button.spiral-star.spiral-star--hover {
    color: var(--star-rating) !important;
    transform: scale(1.08);
}

button.spiral-star.active {
    color: var(--star-rating) !important;
    text-shadow: 0 0 6px rgba(255, 152, 0, 0.35);
}

.spiral-rating-card .spiral-rating-meta {
    white-space: nowrap;
}


.rte-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}
.rte-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}
.rte-btn:hover {
    background: #e5e5e5;
}
.rte-voice-btn.is-listening {
    background: #fff3cd;
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.35);
}
.rte-font-size {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.rte-font-size:hover {
    background: #e5e5e5;
}
.rte-font-size:focus {
    outline: none;
    border-color: #5b8ac5;
    box-shadow: 0 0 3px rgba(91, 138, 197, 0.3);
}
.rte-editor {
    border: 1px solid #90caf9 !important;
    border-radius: 5px !important;
    padding: 15px !important;
    min-height: 200px !important;
    line-height: 1.6;
    outline: none;
}
.rte-editor:focus {
    border-color: #5b8ac5 !important;
    box-shadow: 0 0 5px rgba(91, 138, 197, 0.3) !important;
}
.rte-editor[data-placeholder-shown="true"]::before {
    content: attr(data-placeholder);
    color: #999;
    cursor: text;
}

  /* Badge op de hoofdknop rechtsboven */
  .btn-icon-badge {
    position: relative;
    padding-right: 2.2rem; /* iets ruimte zodat de badge niet over tekst valt */
  }
  .btn-icon-badge .badge-notify {
    position: absolute;
    top: -4px;
    right: -4px;
    transform: translate(25%, -25%);
  }

  /* Optioneel: iets kleinere badge in dropdown-item */
  .dropdown-item .badge-pill {
    font-size: 0.7rem;
  }

/* Account settings (header): appearance + theme selector */
#settingsAccountDropdownMenu {
  min-width: 15.5rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

#settingsAccountDropdownMenu .settings-appearance-header {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6c757d;
  padding-top: 0.35rem;
}

#settingsAccountDropdownMenu .dropdown-theme-block {
  margin-top: 0.1rem;
  padding-top: 0.35rem !important;
}

#settingsAccountDropdownMenu .settings-theme-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.35rem;
}

#settingsAccountDropdownMenu .form-select-sm {
  font-size: 0.8125rem;
  border-radius: 0.375rem;
}

#settingsAccountDropdownMenu .dropdown-item {
  white-space: normal;
}

  
/* Fullscreen overlay */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;              /* verborgen by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* zichtbaar maken */
.loader-overlay.is-visible {
  display: flex;
}

/* box in het midden */
.loader-box {
  background: rgba(255,255,255,0.95);
  color: #111;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  max-width: min(90vw, 420px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.loader-text {
  font-size: 14px;
  line-height: 1.2;
}


  /* Floating magnifier tab on the right side dit is voor de zoekfunctie in incomplete stories en complete stories.*/
  .sidebar-tab {
    position: fixed;
    right: 1em;         /* afstand tot de rechterkant */
                /* midden van het scherm */
    
    border-radius: 9999px; /* rond knopje */
    width: 52px;
    height: 52px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  /* Optioneel: een subtiele hover */
  .sidebar-tab:hover {
    transform: scale(1.1); /* Vergroot de knop een klein beetje */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  }

  .sidebar-tab:active {
    transform: scale(0.5);
  }



  /* Grotere, makkelijk te klikken sluitknop binnen de offcanvas */
  .offcanvas .btn-close {
    transform: scale(1.25);
  }

  /* Op small screens iets naar binnen zodat hij niet aan de rand ‘kleeft’ */
  @media (max-width: 576px) {
    .sidebar-tab {
      right: 0.75rem;
    
      bottom: 50px;
    }
    .offcanvas.offcanvas-start {
    
      left: 0.75rem;
      top: 20px;
      height: 80%;
      width: 80%;
    }
    .modal {

      top: 20px;
     
     
    }
  }



/* Pure CSS spinner (als je niet Bootstrap gebruikt) */
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: rgba(0,0,0,0.65);
  animation: spin 0.8s linear infinite;
}

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

/* Respecteer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* ===== MINIMALIST NAVIGATION BUTTONS WITH ACTIVE STATE ===== */

/* Base minimalist nav link styling */
.nav-minimal {
  background: transparent !important;
  border: none !important;
  color: #d2d3d2 !important;
  padding: 8px 12px !important;
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.nav-minimal:hover {
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Active state: underline + bold text */
.nav-minimal.active {
  color: #ffffff !important;
  font-weight: 700;
  border-bottom-color: #688da6 !important;
  box-shadow: none !important;
}

.nav-minimal:focus {
  box-shadow: none !important;
  outline: none;
}

/* Footer nav links - similar style */
.footer-nav-minimal {
  background: transparent !important;
  color: #d2d3d2 !important;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-nav-minimal:hover {
  color: #ffffff !important;
  transform: translateY(-1px);
}

.footer-nav-minimal.active {
  color: #cff4fc !important;
  font-weight: 700;
  border-bottom-color: #688da6 !important;
  box-shadow: none !important;
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

/* "New" button in header/footer should remain highlighted (action button) */
.nav-minimal.btn-action,
.footer-nav-minimal.btn-action {
  background: #ffcf47 !important;
  color: #1a1a1a !important;
  border-radius: 6px !important;
  border-bottom: 2px solid transparent !important;
  padding: 8px 16px !important;
  font-weight: 600;
}

.nav-minimal.btn-action:hover,
.footer-nav-minimal.btn-action:hover {
  background: #f6bf2d !important;
  transform: translateY(-2px);
}

/* Ensure active state doesn't conflict with action button */
.nav-minimal.btn-action.active,
.footer-nav-minimal.btn-action.active {
  border-bottom-color: #d6a827 !important;
}

/* navbar-text can also have active state */
.navbar-text {
  transition: all 0.3s ease;
}

.navbar-text.active {
  font-weight: 700;
  color: #ffffff !important;
}

/* Compact EN/NL toggle (header + settings dropdown) */
.header-lang-wrap {
  gap: 0;
}

.header-lang-toggle--nav .btn {
  padding: 0.2rem 0.42rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.header-lang-toggle--nav .btn-outline-light:not(.active) {
  opacity: 0.88;
}

.header-lang-toggle--nav .btn-outline-light.active {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}

.header-lang-toggle--dropdown .header-lang-btn {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Static content: About & FAQ */
.about-page__lead {
  max-width: 42rem;
  line-height: 1.5;
}

.about-page__cta-links {
  margin-top: 0.25rem;
}

.faq-page .accordion-button {
  line-height: 1.4;
}

.faq-page .accordion-item {
  transition: box-shadow 0.28s ease, border-color 0.28s ease;
}

.faq-page__answer {
  line-height: 1.55;
}

.faq-page__answer p:last-child,
.faq-page__answer ul:last-child,
.faq-page__answer ol:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Micro-interacties (loader, statische pagina’s, taalwissel, dropdown)
   Geen zware beweging; `prefers-reduced-motion: reduce` schakelt animaties uit.
   -------------------------------------------------------------------------- */
@keyframes ss-fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ss-overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ss-loader-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ss-dropdown-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.header-lang-toggle .header-lang-btn {
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    transform 0.12s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .loader-overlay.is-visible {
    animation: ss-overlay-fade-in 0.22s ease-out forwards;
  }

  .loader-overlay.is-visible .loader-box {
    animation: ss-loader-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  }

  .dropdown-menu.show {
    animation: ss-dropdown-fade 0.18s ease-out;
  }

  .about-page > header {
    animation: ss-fade-rise 0.45s ease-out both;
  }

  .about-page > section {
    animation: ss-fade-rise 0.48s ease-out both;
  }

  .about-page > section:nth-of-type(1) {
    animation-delay: 0.05s;
  }
  .about-page > section:nth-of-type(2) {
    animation-delay: 0.1s;
  }
  .about-page > section:nth-of-type(3) {
    animation-delay: 0.14s;
  }
  .about-page > section:nth-of-type(4) {
    animation-delay: 0.18s;
  }
  .about-page > section:nth-of-type(5) {
    animation-delay: 0.22s;
  }

  .faq-page .accordion-item {
    animation: ss-fade-rise 0.38s ease-out both;
  }

  .faq-page .accordion-item:nth-child(1) {
    animation-delay: 0.02s;
  }
  .faq-page .accordion-item:nth-child(2) {
    animation-delay: 0.05s;
  }
  .faq-page .accordion-item:nth-child(3) {
    animation-delay: 0.08s;
  }
  .faq-page .accordion-item:nth-child(4) {
    animation-delay: 0.11s;
  }
  .faq-page .accordion-item:nth-child(5) {
    animation-delay: 0.14s;
  }
  .faq-page .accordion-item:nth-child(6) {
    animation-delay: 0.17s;
  }
  .faq-page .accordion-item:nth-child(7) {
    animation-delay: 0.2s;
  }
  .faq-page .accordion-item:nth-child(8) {
    animation-delay: 0.23s;
  }
  .faq-page .accordion-item:nth-child(9) {
    animation-delay: 0.26s;
  }
  .faq-page .accordion-item:nth-child(10) {
    animation-delay: 0.29s;
  }

  .faq-page .accordion-button {
    transition: background-color 0.22s ease, box-shadow 0.22s ease, color 0.2s ease;
  }

  .faq-page .accordion-button:not(.collapsed) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.faq-page .accordion-item:hover {
  box-shadow: 0 5px 18px rgba(26, 35, 52, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .loader-overlay.is-visible,
  .loader-overlay.is-visible .loader-box,
  .dropdown-menu.show,
  .about-page > header,
  .about-page > section,
  .faq-page .accordion-item {
    animation: none !important;
    animation-delay: 0s !important;
  }
}

/* Cookietoestemming (fixed; boven mobiele footer) */
.cookie-consent-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  background: linear-gradient(180deg, rgba(26, 35, 52, 0.97) 0%, #141b28 100%);
  color: #e8eaef;
  border-top: 1px solid rgba(104, 141, 166, 0.45);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.cookie-consent-bar__title {
  color: #fff;
  font-weight: 600;
}

.cookie-consent-bar__text {
  color: rgba(232, 234, 239, 0.92);
  max-width: 52rem;
}

.cookie-consent-bar__link {
  color: #9ecfff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-bar__link:hover {
  color: #cfe6ff;
}

@media screen and (max-width: 991px) {
  .cookie-consent-bar {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  body:has(#cookieConsentBar) main {
    padding-bottom: calc(4.75rem + 6.25rem + env(safe-area-inset-bottom, 0px));
  }
}

@media screen and (min-width: 992px) {
  body:has(#cookieConsentBar) main {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }
}
