/*
 * r504 – lanceringsafwerking voor alle losse Snoeten-pagina's.
 * Profielpagina's en modale spelvensters behouden bewust hun eigen maatvoering.
 */

@media (min-width: 1025px) {
    #container {
        width: calc(100% - 40px) !important;
        max-width: none !important;
        margin: 20px 20px 0 !important;
    }

    #messagesWrapper {
        width: calc(100% - 40px);
        max-width: none;
        margin: 20px 20px 0;
    }

    #messagesWrapper > #header,
    #messagesWrapper > #footer {
        width: 100%;
    }
}

#container,
#container > #header,
#profile > #header,
#container > #main,
#container > #footer,
#container #content,
#container #content-inner {
    min-width: 0;
    box-sizing: border-box;
}

#container > #header,
#profile > #header,
#container > #main,
#container > #footer {
    width: 100%;
}

#container #main img,
#container #main video,
#container #main canvas,
#container #main iframe {
    max-width: 100%;
}

#container #main table {
    max-width: 100%;
}

#container :where(a, button, input, textarea, select):focus-visible {
    outline: 3px solid rgba(85, 122, 62, .28);
    outline-offset: 2px;
}

/* De gekoppelde informatiepagina's krijgen dezelfde rustige blokmaat. */
#container.help-linked-page-shell #main.help-linked-page,
#container.help-linked-page-shell #main.help-linked-donations-page,
#container.helpdesk-page-shell #main.helpdesk-page {
    width: 100%;
    max-width: none;
    min-width: 0;
}

#container.helpdesk-page-shell #main.helpdesk-page {
    padding-top: 0;
}

/* R515: verfijnde oranje siteheader in de stijl van de eerste Hyves-redesign. */
@media (min-width: 1025px) {
    #container > #header,
    #messagesWrapper > #header,
    #profile > #header {
        border: 1px solid rgba(119, 61, 4, .18);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .34),
            inset 0 -1px 0 rgba(126, 61, 2, .18),
            0 3px 9px rgba(87, 47, 7, .12);
    }

    #header #tabs {
        inset: 10px 0 auto 0;
        width: 100%;
        padding: 0 8px;
        gap: 4px;
        box-sizing: border-box;
    }

    #header #tabs a {
        min-width: 0;
        padding: 0 12px;
        box-sizing: border-box;
        border: 1px solid transparent;
        border-radius: 8px;
        text-shadow: 0 1px 0 rgba(255, 255, 255, .20);
        transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
    }

    #header #tabs a:hover,
    #header #tabs a:focus-visible {
        top: 0;
        background: linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.09) 100%);
        border-color: rgba(111, 56, 4, .12);
        transform: translateY(-1px);
    }

    #header #tabs a.active,
    #header #tabs a.active:hover,
    #header #tabs a.active:focus-visible {
        top: 0;
        color: #FFFFFF;
        background: linear-gradient(180deg, #D98213 0%, #B96008 52%, #914603 100%);
        border-color: rgba(102, 46, 0, .50);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.30),
            inset 0 -1px 0 rgba(74,30,0,.22),
            0 1px 2px rgba(91,43,2,.18);
        text-shadow: 0 1px 1px rgba(71, 32, 0, .58);
        transform: none;
    }
}

#header #tabs .tab-count {
    top: -5px;
    right: 6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    border: 2px solid rgba(255,255,255,.95);
    border-radius: 999px;
    background: linear-gradient(145deg, #FF5A5A 0%, #E31B1B 52%, #D90000 100%);
    box-shadow: 0 2px 5px rgba(111, 12, 8, .30), inset 0 1px 0 rgba(255,255,255,.30);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: -.15px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(92, 0, 0, .44);
}

#header #tabs .header-message-count {
    position: absolute !important;
    top: -5px !important;
    right: 6px !important;
    min-width: 20px !important;
    height: 20px !important;
    margin: 0;
    padding: 0 6px !important;
    line-height: 16px !important;
    transform: none;
}

/* R516: de blauwe taakbalk krijgt dezelfde verzorgde diepte als de siteheader. */
@media (min-width: 1025px) {
    #container > #taskbar,
    #profile > #taskbar,
    #container.groups-profile > #taskbar,
    #messages > #taskbar {
        background:
            radial-gradient(circle at 50% 76px, rgba(175, 211, 255, .22) 0, rgba(89, 143, 213, .12) 29%, rgba(30, 76, 145, 0) 58%),
            linear-gradient(180deg, #3974C7 0%, #2C65B8 46%, #22549F 100%);
        border: 1px solid rgba(17, 61, 126, .56);
        border-radius: 12px;
        box-shadow:
            inset 1px 0 0 rgba(255, 255, 255, .14),
            inset -1px 0 0 rgba(8, 44, 99, .16),
            inset 0 1px 0 rgba(255, 255, 255, .24),
            0 10px 24px rgba(23, 55, 104, .20);
    }
}

#taskbar #logo {
    isolation: isolate;
}

#taskbar #logo::before,
#taskbar #logo::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 49%;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#taskbar #logo::before {
    z-index: 0;
    width: 166px;
    height: 166px;
    background: radial-gradient(circle at 42% 34%,
        rgba(221, 237, 255, .48) 0%,
        rgba(135, 184, 239, .28) 28%,
        rgba(46, 101, 178, .20) 49%,
        rgba(17, 57, 116, .34) 66%,
        rgba(13, 48, 104, 0) 74%);
    box-shadow: inset 0 0 22px rgba(222, 239, 255, .14);
}

#taskbar #logo::after {
    z-index: 1;
    width: 142px;
    height: 142px;
    border: 1px solid rgba(210, 232, 255, .14);
    box-shadow: 0 12px 24px rgba(8, 39, 91, .16);
}

#taskbar #logo-wrapper {
    z-index: 2;
}

#taskbar #logo-smileys {
    z-index: 3;
}

#taskbar-nav {
    position: relative;
}

#taskbar-nav a {
    position: relative;
    min-height: 40px;
    margin-top: 7px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(5, 37, 84, .44);
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#taskbar-nav a:hover,
#taskbar-nav a:focus-visible {
    left: auto;
    color: #FFFFFF;
    background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .08));
    border-color: rgba(211, 231, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
    transform: translateX(3px);
}

#taskbar-nav a.active,
#taskbar-nav a.active:hover,
#taskbar-nav a.active:focus-visible {
    color: #FFFFFF;
    background: linear-gradient(180deg, #1F5EAD 0%, #144E98 52%, #0B4085 100%);
    border-color: rgba(5, 46, 105, .76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        inset 0 -1px 0 rgba(3, 31, 75, .24),
        0 3px 8px rgba(8, 41, 91, .24);
    transform: none;
}

#taskbar-nav .taskbar-icon-wrap {
    width: 24px;
    min-width: 24px;
    margin: 0 10px 0 0;
    float: none;
}

#taskbar-nav .taskbar-icon,
#taskbar-nav .taskbar-icon svg {
    width: 22px;
    height: 22px;
}

#taskbar-nav .taskbar-icon {
    filter: drop-shadow(0 1px 1px rgba(5, 34, 77, .34));
}

#taskbar-nav .spread {
    height: 1px;
    margin: 11px 10px 4px;
    display: block;
    background: linear-gradient(90deg, transparent, rgba(218, 235, 255, .34) 18%, rgba(218, 235, 255, .34) 82%, transparent);
    box-shadow: 0 1px 0 rgba(6, 42, 94, .18);
}

#taskbar #taskbar-nav a .tab-count,
#taskbar .tabs a .tab-count {
    position: absolute;
    top: 50%;
    right: 7px;
    min-width: 20px;
    height: 20px;
    margin: 0;
    padding: 0 6px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, .96);
    border-radius: 999px;
    background: linear-gradient(145deg, #FF5A5A 0%, #E31B1B 52%, #D90000 100%);
    box-shadow: 0 2px 5px rgba(77, 8, 9, .34), inset 0 1px 0 rgba(255, 255, 255, .30);
    color: #FFFFFF;
    font: 800 11px/16px var(--base-font, sans-serif);
    text-align: center;
    text-shadow: 0 1px 1px rgba(92, 0, 0, .44);
    transform: translateY(-50%);
}

/* Ook de smalle berichtentaakbalk blijft herkenbaar blauw en gebruikt SVG's. */
@media (min-width: 1025px) {
    #messages > #taskbar .tabs {
        inset: auto;
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        display: grid;
        gap: 8px;
    }

    #messages > #taskbar .tabs a {
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid transparent;
        border-radius: 10px;
        color: #FFFFFF;
        transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    }

    #messages > #taskbar .tabs a:hover,
    #messages > #taskbar .tabs a:focus-visible {
        background: rgba(255, 255, 255, .13);
        border-color: rgba(216, 235, 255, .17);
        transform: translateY(-1px);
    }

    #messages > #taskbar .tabs a.active {
        background: linear-gradient(180deg, #1F5EAD 0%, #144E98 52%, #0B4085 100%);
        border-color: rgba(5, 46, 105, .76);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 3px 8px rgba(8,41,91,.22);
    }

    #messages > #taskbar .tabs .taskbar-icon,
    #messages > #taskbar .tabs .taskbar-icon svg {
        width: 25px;
        height: 25px;
    }

    #messages > #taskbar .tabs a .tab-count {
        top: 5px;
        right: 4px;
        transform: none;
    }
}

#container.help-linked-page-shell #main.help-linked-page .help-section,
#container.helpdesk-page-shell #main.helpdesk-page .help-section {
    padding: clamp(20px, 2.1vw, 28px);
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(35, 49, 29, .08);
}

#container.help-linked-page-shell #main.help-linked-page .help-section-heading,
#container.helpdesk-page-shell #main.helpdesk-page .help-section-heading {
    align-items: flex-end;
    margin-bottom: 20px;
}

#container.help-linked-page-shell #main.help-linked-page .help-section-heading > p,
#container.helpdesk-page-shell #main.helpdesk-page .help-section-heading > p {
    max-width: 520px;
    margin: 0;
    line-height: 1.55;
    text-align: right;
}

#container.help-linked-page-shell :where(.info-card, .info-side-card, .rule-card, .statistics-card, .statistics-panel),
#container.helpdesk-page-shell :where(.info-card, .helpdesk-status-card) {
    height: 100%;
    border-radius: 8px;
}

#container.help-linked-page-shell :where(.info-card, .info-side-card, .rule-card) :where(p, li),
#container.helpdesk-page-shell :where(.info-card, .helpdesk-status-card) :where(p, li) {
    overflow-wrap: anywhere;
}

/* Brede schermen benutten de extra ruimte met evenwichtige kaartkolommen. */
@media (min-width: 1440px) {
    #container.help-linked-page-shell .info-card-grid,
    #container.helpdesk-page-shell .info-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    #container.help-linked-page-shell .info-card-feature,
    #container.helpdesk-page-shell .info-card-feature {
        grid-column: 1 / -1;
    }

    #container.help-linked-page-shell .rules-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    #container.help-linked-page-shell .rule-card-wide {
        grid-column: 1 / -1;
    }

    #container.help-linked-page-shell .legal-layout {
        grid-template-columns: minmax(0, 1fr) 330px;
        gap: 22px;
    }
}

/* Oude, losse formulieren blijven prettig leesbaar binnen de brede pagina. */
#container.fullscreen #login-form,
#container.fullscreen #register-form {
    width: min(100%, 920px);
    margin-inline: auto;
}

@media (max-width: 1024px) {
    #container,
    #messagesWrapper {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }
}

@media (max-width: 760px) {
    #container.help-linked-page-shell #main.help-linked-page .help-section,
    #container.helpdesk-page-shell #main.helpdesk-page .help-section {
        padding: 18px 16px;
        border-radius: 8px;
    }

    #container.help-linked-page-shell #main.help-linked-page .help-section-heading,
    #container.helpdesk-page-shell #main.helpdesk-page .help-section-heading {
        display: block;
    }

    #container.help-linked-page-shell #main.help-linked-page .help-section-heading > p,
    #container.helpdesk-page-shell #main.helpdesk-page .help-section-heading > p {
        max-width: none;
        margin-top: 8px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* r607: logo en menu blijven duidelijk van elkaar gescheiden in de taakbalk. */
@media (min-width: 1025px) {
    #taskbar.profile-taskbar-collapsible #logo {
        flex: 0 0 140px;
        margin: 0 0 30px !important;
    }

    #taskbar.profile-taskbar-collapsible #taskbar-nav {
        flex: 1 1 auto;
        margin-top: 0 !important;
    }
}
