/* TipGo v2 - Public CSS (admin styles moved to admin.css) */

/* === RESET & BASE === */
*, *:before, *:after { box-sizing: border-box; }
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
* { color: #979894; font-size: 11px; }
body { color: black; font-family: Tahoma, "Helvetica Neue", Helvetica, Arial, sans-serif; background: #fff; margin: 0; }

h1, h2, h3, h4, h5, h6, p, li, a, b { font-family: inherit; font-weight: 400; line-height: 1; color: inherit; }
img { vertical-align: middle; border: 0; }
a { background-color: transparent; text-decoration: none; }
a:active, a:hover { outline: 0; }
b, strong { font-weight: 700; }
hr { box-sizing: content-box; height: 1px; border: 0; color: rgba(164,166,163,0.3); background-color: rgba(164,166,163,0.3); }

/* === FORMS === */
button, input, optgroup, select, textarea { color: inherit; font: inherit; margin: 0; outline: none; }
button { overflow: visible; }
button, select { text-transform: none; }
button, input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; }
input { line-height: normal; -webkit-appearance: none; }
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-clear { display: none; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #aaa; font-size: 14px; cursor: pointer; padding: 0 2px; line-height: 1; z-index: 2; }
.search-clear:hover { color: #656d65; }
.search-wrap { position: relative; flex: 1; display: flex; align-items: center; }

/* === ALIGNMENT === */
.left { text-align: left; }
.floatleft { float: left; }
.right { text-align: right; }
.floatright { float: right; }

/* === GRID === */
.container-miio { width: 575px; height: auto; margin: 0 auto; }
.row-miio:after { clear: both; }
.row-miio:before, .row-miio:after { display: table; content: " "; }
.col-miio { position: relative; float: left; width: 100%; }
.col-2, .col-3, .col-links, .col-rechts, .col-4, .col-8, .col-links-front, .col-search, .col-rechts-front {
    position: relative; float: left; padding: 0;
}
.col-2 { width: 16.667%; }
.col-3 { width: 25%; }
.col-links { width: 90%; }
.col-links-front { width: 10%; }
.col-search { width: 80%; }
.col-rechts { width: 10%; text-align: right; }
.col-rechts-front { width: 10%; text-align: right; }
.col-4 { width: 33.333%; }
.col-8 { width: 66.667%; }

/* === DEBUG ALIGNMENT GUIDES (temp) === */
.nav { position: relative; --nav-icon: 3rem; display: flex; align-items: center; gap: 1em; }

/* === PAGE HEADER === */
.nav-sep { color: #979894; font-size: 1.8em; line-height: 1; vertical-align: middle; margin: 0 3px 0 1px; position: relative; top: -1.2px; }
.nav-icon { width: var(--nav-icon, 2em); height: var(--nav-icon, 2em); flex-shrink: 0; fill: #979894; }
/* Edit-mode actief — i en potlood worden groen voor visuele "je bent aan het editen" cue.
   icon-info en icon-grid-order gebruiken fill="currentColor" in hun paths binnen <use>,
   dus we moeten BEIDE `fill` (voor het svg-element zelf) en `color` (voor inherited
   currentColor binnen referenced symbols) zetten. */
.nav-icon.is-editing,
.nav-icon.is-editing * { fill: #4a7c4a !important; color: #4a7c4a !important; }
html[data-theme="dark"] .nav-icon.is-editing,
html[data-theme="dark"] .nav-icon.is-editing * { fill: #6aaa6a !important; color: #6aaa6a !important; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .nav-icon.is-editing,
    html:not([data-theme="light"]) .nav-icon.is-editing * { fill: #6aaa6a !important; color: #6aaa6a !important; }
}
.nav-icon-sep { fill: #979894; flex-shrink: 0; width: 0.35em; height: 1em; margin: 0 0.15em; }
.nav-left-icons { display: flex; align-items: center; white-space: nowrap; position: relative; top: -0.5px; min-width: 0; flex: 1; overflow: hidden; }
.nav-left-icons > * { flex-shrink: 0; }
.nav-left-icons h2 { margin: 0 0 0 0.3em; font-size: 2.3rem; position: relative; top: -1px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; line-height: 1.3; padding-bottom: 0.05em; }
.nav-right-icons { display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; flex-shrink: 0; gap: 0.15em; position: relative; top: 2px; margin-right: -2em; }
.nav-right-icons > * { flex-shrink: 0; }
.page-header { margin: 20px 0 30px; min-height: 36px; overflow: visible; }
.page-header .row-miio { overflow: visible; }
.page-header, .meta-content, .settings-content { padding: 0 1.7%; }
.search, .nav { height: auto; min-height: 44px; padding-top: 0; }

h2 { font-size: 2.3em; text-transform: lowercase; margin: 0 0 0 0.5em; text-align: center; }

/* === ICONS (SVG-based, legacy font removed) === */

/* === SEARCH BAR === */
#search { width: 100%; }
#s {
    height: 70px; border: 1px solid rgba(164,166,163,0.3); background: transparent;
    line-height: 70px; float: left; width: 100%; text-indent: 5px;
    font-family: inherit; font-size: 1.7em; color: #656d65;
    border-radius: 3px;
}

/* === FRONT PAGE GRID === */
.front-grid-block, .tipgo-logo { text-align: center; cursor: pointer; }
.front-grid-block { margin: 7px 0; }
.grid { display: block; }

/* === LINK/MAP BLOCKS === */
.link-block { margin: 15px 0; text-align: center; cursor: pointer; position: relative; }
.link-block img, .link-block svg { display: block; margin: 0 auto; }
.link-icon, #add_link img.add-link, .userlink_icon {
    height: auto; border-radius: 8px;
    border: 1px solid rgba(164,166,163,0.3); padding: 2px;
}
/* Subtle darker border for user-uploaded custom icons (differentiate from redactional) */
.userlink_icon.userlink_icon-custom {
    border-color: rgba(164,166,163,0.40);
}
.front-icon, .link-icon, .grid-icon, .grid svg, .front-grid-block svg, img.add-link, .userlink_icon { width: 90px; height: 90px; }
.tipgo-logo { margin-top: 55px !important; }
.tipgo-logo .logo-img { width: 90px; height: auto; background: transparent; cursor: pointer; }
.tipgo-logo div { font-size: 1.2em; line-height: 1em; margin-top: 1.6em; height: 1.75em; }
/* Inline SVG logo inherits from generic svg rule (90x90) - same as v1 */
.grid-label, .link-label, .front-label { font-size: 1.2em; text-transform: lowercase; }
.link-label, .grid-label { line-height: 1em; height: 1.8em; max-width: 95%; margin: 0.3em auto 0; }
.front-label { line-height: 1em; margin-top: 0; height: 1.75em; }

/* User-added links */
.userlink { position: absolute; width: 100%; top: 0; left: 0; height: 90px; line-height: 90px; font-size: 3em; font-weight: normal; }

/* Add link modal */
.addlink-box, .editlink-box {
    padding: 15px; text-align: center; position: fixed; width: 380px; top: 80px;
    left: 50%; margin-left: -190px; background: white; border: 1px solid black; z-index: 100;
}

/* === META PAGE === */
.meta-content a { text-decoration: underline; }
.meta-block, .settings-block { margin-bottom: 15px; }
.meta-label, .settings-label {
    font-family: inherit; color: #656d65; font-size: 1.2em;
    margin: 5px 0; line-height: 1.1; cursor: pointer;
}
.meta-description, .meta-description a, .settings-description {
    font-family: inherit; font-size: 1.2em; margin: 0 0 15px;
    line-height: 1.3; color: #a3a5a2;
}

/* === BUTTONS === */
[class*='btn'] {
    border: 1px solid rgba(164,166,163,0.3); border-radius: 3px;
    display: inline-block; letter-spacing: 1px; padding: 7px 10px; text-decoration: none;
}
.btn { background-color: #a3a5a2; color: white; margin-left: 5px; }
.btn:hover { background-color: #656d65; color: white; cursor: pointer; }
.btn-sm { font-size: 0.85em; padding: 2px 8px; }
.btn-ghost { background: transparent; color: #979894; }
.btn-ghost:hover { background: #f0f0f0; color: #656d65; }
.btn-sort { padding: 1px 8px; font-size: 0.7em; line-height: 1; display: block; width: 100%; }
.sort-buttons { display: inline-flex; flex-direction: column; gap: 5px; margin: 0 5px; vertical-align: middle; }

/* === DRAG & DROP === */
.drag-handle { cursor: grab; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.draggable-link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.draggable-link.dragging { opacity: 0.3; background: #f0f0f0; }

/* === USER FOLDERS === */
.folder-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.folder-block { background: #f5f5f5; border: 1px solid #ddd; border-radius: 6px; padding: 12px 16px; cursor: pointer; min-width: 140px; }
.folder-block:hover { background: #eef5ee; border-color: #4a7c4a; }
.folder-block .folder-name { font-weight: bold; color: #656d65; }
.folder-block .folder-count { font-size: 0.85em; color: #999; }
.folder-block .folder-actions { margin-top: 6px; }
.folder-block .folder-actions button { font-size: 0.8em; padding: 2px 6px; margin-right: 4px; }
.folder-section { margin-bottom: 24px; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px; }
.folder-section h3 { margin: 0 0 10px; color: #4a7c4a; font-size: 1.1em; }
.folder-add-btn { background: #4a7c4a; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 1em; }
.folder-add-btn:hover { background: #3d6b3d; }
.move-folder-select { font-size: 0.85em; padding: 2px 4px; margin-left: 6px; }
.folder-tag { font-size: 0.7em; color: #999; position: absolute; bottom: 0; left: 0; right: 0; text-align: center; }
.folder-header { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; margin-bottom: 0; cursor: pointer; }
.folder-chevron { color: #999; font-size: 1em; user-select: none; }
.folder-header .folder-count { color: #999; font-size: 0.9em; }
.folder-header .folder-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.folder-header .drag-handle { cursor: grab; user-select: none; font-size: 1.2em; margin-right: 6px; color: #999; }
.folder-header .drag-handle:active { cursor: grabbing; }
.draggable-folder { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.draggable-folder.dragging { opacity: 0.3; background: #f0f0f0; }
.draggable-folder-link { transition: transform 0.15s ease, box-shadow 0.15s ease; cursor: grab; }
.draggable-folder-link.dragging { opacity: 0.3; background: #f0f0f0; }
.folder-header.drop-target { background: #eef5ee; border: 2px dashed #4a7c4a; border-radius: 4px; }
.folder-body { padding-top: 10px; border-top: 1px solid rgba(164,166,163,0.2); margin-top: 8px; }
.folder-grid-block { cursor: pointer; }
.folder-icon-img { padding: 12px; }
.folder-contents { padding: 0 10px 16px; }
.folder-title { font-size: 2.3em; font-weight: 400; text-transform: lowercase; margin: 12px 0 8px; text-align: left; }
.folder-title-icon { width: 28px; height: 28px; vertical-align: bottom; }

/* === FORM STYLES (login/register) === */
.extralong { height: 200%; }
.boks h2 { margin-bottom: 0.5em; }
.mijn h2 { font-size: 1.8em; }

section#loginBox, section#registerBox, section#forgetBox {
    background: white; border: 1px solid rgba(164,166,163,0.3); border-radius: 3px;
    margin: 5% auto; padding: 24px; width: 100%;
}

form.mijntipgo label { display: block; margin: 6px 0; height: 36px; line-height: 2.2em; }
form.mijntipgo input[type="text"],
form.mijntipgo input[type="password"],
form.mijntipgo textarea {
    background: white; border: 1px solid rgba(164,166,163,0.3); border-radius: 3px;
    display: block; font-size: 14px; margin: 6px 0 12px; padding: 8px; width: 100%;
}

.formcontrol {
    background: white; border: 1px solid rgba(164,166,163,0.3); border-radius: 3px;
    font-size: 14px; padding: 8px; width: 100%;
}

.form-warning { color: red; font-weight: bold; padding-top: 2em; }
.form-confirm { color: green; font-weight: bold; padding-top: 2em; }

/* === CRUMBS === */
.crumb { cursor: pointer; font-size: inherit; text-decoration: none; }

/* === SVG ICON COLORS === */
g.icon, path.icon, rect.icon, circle.icon, polygon.icon, ellipse.icon, textpath.icon { fill: #656d65; }
g.icon-outline, path.icon-outline, rect.icon-outline, circle.icon-outline, polygon.icon-outline, ellipse.icon-outline, textpath.icon-outline {
    fill: none; stroke: #656d65;
}
.meta-label, #s, .tipgo-logo, .settings-label { color: #656d65; }

/* === RESPONSIVE === */

/* Large desktops */
@media (min-width: 1440px) {
    .container-miio { width: 800px !important; }
    .page-header { margin: 20px 0 2px; padding: 10px; }
    .nav i, .nav [class^="icon-"] { font-size: 3em; }
    h2 { font-size: 2.3em; margin: 4px 0 0 6px; }
    .meta-content, .settings-content { padding: 10px 3.7%; }
    .meta-label, .settings-label { font-size: 1.6em; }
    .meta-description, .settings-description { font-size: 1.4em; }
    .front-icon, .link-icon, .grid-icon, .grid svg, .front-grid-block svg, img.add-link, .userlink_icon { width: 120px; height: 120px; }
    .tipgo-logo .logo-img { width: 120px; }
    .userlink { height: 120px; line-height: 120px; }
    .front-grid-block, .link-block { margin: 10px 0; }
    .front-label, .link-label, .grid-label { font-size: 1.6em; }
    .front-label { margin-top: -0.4em; }
    .link-label, .grid-label { line-height: 0.95em; height: 2.2em; margin: 0.4em auto 0; }
}

/* Small phones */
@media (max-width: 480px) {
    * { font-size: 10px; }
    .container-miio { width: 320px !important; }
    .page-header { margin: 10px 0 15px; }
    .page-header, .meta-content, .settings-content { padding: 0 2%; }
    .nav { --nav-icon: 32px; height: auto !important; gap: 0 !important; }
    .nav .col-links { width: auto !important; }
    .nav .col-rechts { width: auto !important; }
    .nav i, .nav [class^="icon-"] { font-size: 2em; }
    .nav-left-icons h2 { font-size: 18px !important; margin: 0 0 0 4px !important; top: 0 !important; }
    .nav-right-icons { margin-right: -20px !important; top: 0 !important; gap: 2px !important; }
    h2 { font-size: 1.45em; margin: 2px 0 0 6px; }
    .front-icon, .link-icon, .grid-icon, .grid svg, .front-grid-block svg, img.add-link, .userlink_icon { width: 70px; height: 70px; }
    .tipgo-logo .logo-img { width: 70px; }
    .userlink { height: 70px; line-height: 70px; font-size: 2em; }
    .front-grid-block, .link-block { margin: 7px 0; }
    #s, #search-input, #page-search-input { height: 70px; font-size: 22px !important; line-height: 70px; }
    .nav-left-icons form { margin-left: 1em !important; margin-right: 0.5em !important; }
    .nav-left-icons { max-width: 78% !important; width: auto !important; }
    #find { line-height: 0.8; }
}

/* Medium phones (iPhone 6 size) */
@media (min-width: 481px) and (max-width: 767px) {
    * { font-size: 10px; }
    .container-miio { width: 360px !important; }
    .page-header { margin: 10px 0 15px; }
    .page-header, .meta-content, .settings-content { padding: 0 2%; }
    .nav { --nav-icon: 32px; height: auto !important; gap: 0 !important; }
    .nav .col-links { width: auto !important; }
    .nav .col-rechts { width: auto !important; }
    .nav i, .nav [class^="icon-"] { font-size: 2em; }
    .nav-left-icons h2 { font-size: 18px !important; margin: 0 0 0 4px !important; top: 0 !important; }
    .nav-right-icons { margin-right: -20px !important; top: 0 !important; gap: 2px !important; }
    h2 { font-size: 1.3em; margin: 4px 0 0 4px; }
    .front-icon, .link-icon, .grid-icon, .grid svg, .front-grid-block svg, img.add-link, .userlink_icon { width: 78px; height: 78px; }
    .tipgo-logo .logo-img { width: 78px; }
    .userlink { height: 78px; line-height: 78px; font-size: 2.2em; }
    .front-grid-block, .link-block { margin: 7px 0; }
    .front-label, .link-label, .grid-label { font-size: 1em; }
    .front-label { margin-top: -0.4em; }
    .link-label, .grid-label { line-height: 0.95em; height: 2.2em; margin: 0.6em auto 0; }
    #s, #search-input, #page-search-input { height: 70px; font-size: 22px !important; line-height: 70px; }
    .nav-left-icons form { margin-left: 1em !important; margin-right: 0.5em !important; }
    .nav-left-icons { max-width: 78% !important; width: auto !important; }
}

/* === DARK MODE (auto - respects OS, blocked by data-theme="light") === */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]):root { color-scheme: dark; }
    html:not([data-theme="light"]), html:not([data-theme="light"]) body { background: #1a1a2e; color: #e0e0e0; }
    html:not([data-theme="light"]) * { color: #a8a8a3; }
    html:not([data-theme="light"]) hr { color: rgba(164,166,163,.15); background-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) #s { border-color: rgba(164,166,163,.15); background: rgba(255,255,255,.06); color: #b0b8b0; }
    html:not([data-theme="light"]) .link-icon, html:not([data-theme="light"]) #add_link img.add-link, html:not([data-theme="light"]) .userlink_icon { border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) .userlink_icon.userlink_icon-custom { border-color: rgba(200,210,200,.30); }
    html:not([data-theme="light"]) .addlink-box, html:not([data-theme="light"]) .editlink-box { background: #16213e; border-color: rgba(164,166,163,.3); }
    html:not([data-theme="light"]) .meta-label, html:not([data-theme="light"]) .settings-label, html:not([data-theme="light"]) #s, html:not([data-theme="light"]) .tipgo-logo { color: #9ca89c; }
    html:not([data-theme="light"]) .meta-description, html:not([data-theme="light"]) .meta-description a, html:not([data-theme="light"]) .settings-description { color: #8a8c88; }
    html:not([data-theme="light"]) .btn { background-color: #4a4c4a; }
    html:not([data-theme="light"]) .btn:hover { background-color: #7a847a; }
    html:not([data-theme="light"]) .btn-ghost:hover { background: rgba(255,255,255,.08); color: #b0b8b0; }
    html:not([data-theme="light"]) [class*='btn'] { border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) .draggable-link.dragging, html:not([data-theme="light"]) .draggable-folder.dragging, html:not([data-theme="light"]) .draggable-folder-link.dragging { background: rgba(255,255,255,.05); }
    html:not([data-theme="light"]) .folder-block { background: #252540; border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) .folder-block:hover { background: #2a3a2a; border-color: #4a7c4a; }
    html:not([data-theme="light"]) .folder-block .folder-name { color: #9ca89c; }
    html:not([data-theme="light"]) .folder-block .folder-count, html:not([data-theme="light"]) .folder-tag, html:not([data-theme="light"]) .folder-chevron, html:not([data-theme="light"]) .folder-header .folder-count, html:not([data-theme="light"]) .folder-header .drag-handle { color: #777; }
    html:not([data-theme="light"]) .folder-section { border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) .folder-section h3 { color: #6aaa6a; }
    html:not([data-theme="light"]) .folder-header.drop-target { background: rgba(74,124,74,.15); border-color: #4a7c4a; }
    html:not([data-theme="light"]) .folder-body { border-top-color: rgba(164,166,163,.1); }
    html:not([data-theme="light"]) section#loginBox, html:not([data-theme="light"]) section#registerBox, html:not([data-theme="light"]) section#forgetBox { background: #16213e; border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) form.mijntipgo input[type="text"], html:not([data-theme="light"]) form.mijntipgo input[type="password"], html:not([data-theme="light"]) form.mijntipgo textarea { background: #1e2a4a; border-color: rgba(164,166,163,.15); color: #c0c0c0; }
    html:not([data-theme="light"]) .formcontrol { background: #1e2a4a; border-color: rgba(164,166,163,.15); color: #c0c0c0; }
    html:not([data-theme="light"]) g.icon, html:not([data-theme="light"]) path.icon, html:not([data-theme="light"]) rect.icon, html:not([data-theme="light"]) circle.icon, html:not([data-theme="light"]) polygon.icon, html:not([data-theme="light"]) ellipse.icon, html:not([data-theme="light"]) textpath.icon { fill: #9ca89c; }
    html:not([data-theme="light"]) g.icon-outline, html:not([data-theme="light"]) path.icon-outline, html:not([data-theme="light"]) rect.icon-outline, html:not([data-theme="light"]) circle.icon-outline, html:not([data-theme="light"]) polygon.icon-outline, html:not([data-theme="light"]) ellipse.icon-outline, html:not([data-theme="light"]) textpath.icon-outline { stroke: #9ca89c; }
    html:not([data-theme="light"]) .nav-icon { fill: #9ca89c; }
    html:not([data-theme="light"]) a { color: #6db3f8; }
    html:not([data-theme="light"]) .meta-content a { color: #6db3f8; }
    html:not([data-theme="light"]) .link-icon, html:not([data-theme="light"]) .userlink_icon, html:not([data-theme="light"]) .front-icon { filter: brightness(0.95); }
    html:not([data-theme="light"]) .form-warning { color: #f5a0a0; }
    html:not([data-theme="light"]) .form-confirm { color: #7ddf9b; }
}

/* === FORCED DARK MODE (user override via data-theme="dark") === */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"], html[data-theme="dark"] body { background: #1a1a2e; color: #e0e0e0; }
html[data-theme="dark"] * { color: #a8a8a3; }
html[data-theme="dark"] hr { color: rgba(164,166,163,.15); background-color: rgba(164,166,163,.15); }
html[data-theme="dark"] #s { border-color: rgba(164,166,163,.15); background: rgba(255,255,255,.06); color: #b0b8b0; }
html[data-theme="dark"] .link-icon, html[data-theme="dark"] #add_link img.add-link, html[data-theme="dark"] .userlink_icon { border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] .userlink_icon.userlink_icon-custom { border-color: rgba(200,210,200,.30); }
html[data-theme="dark"] .addlink-box, html[data-theme="dark"] .editlink-box { background: #16213e; border-color: rgba(164,166,163,.3); }
html[data-theme="dark"] .meta-label, html[data-theme="dark"] .settings-label, html[data-theme="dark"] #s, html[data-theme="dark"] .tipgo-logo { color: #9ca89c; }
html[data-theme="dark"] .meta-description, html[data-theme="dark"] .meta-description a, html[data-theme="dark"] .settings-description { color: #8a8c88; }
html[data-theme="dark"] .btn { background-color: #4a4c4a; }
html[data-theme="dark"] .btn:hover { background-color: #7a847a; }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,.08); color: #b0b8b0; }
html[data-theme="dark"] [class*='btn'] { border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] .draggable-link.dragging, html[data-theme="dark"] .draggable-folder.dragging, html[data-theme="dark"] .draggable-folder-link.dragging { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .folder-block { background: #252540; border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] .folder-block:hover { background: #2a3a2a; border-color: #4a7c4a; }
html[data-theme="dark"] .folder-block .folder-name { color: #9ca89c; }
html[data-theme="dark"] .folder-block .folder-count, html[data-theme="dark"] .folder-tag, html[data-theme="dark"] .folder-chevron, html[data-theme="dark"] .folder-header .folder-count, html[data-theme="dark"] .folder-header .drag-handle { color: #777; }
html[data-theme="dark"] .folder-section { border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] .folder-section h3 { color: #6aaa6a; }
html[data-theme="dark"] .folder-header.drop-target { background: rgba(74,124,74,.15); border-color: #4a7c4a; }
html[data-theme="dark"] .folder-body { border-top-color: rgba(164,166,163,.1); }
html[data-theme="dark"] section#loginBox, html[data-theme="dark"] section#registerBox, html[data-theme="dark"] section#forgetBox { background: #16213e; border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] form.mijntipgo input[type="text"], html[data-theme="dark"] form.mijntipgo input[type="password"], html[data-theme="dark"] form.mijntipgo textarea { background: #1e2a4a; border-color: rgba(164,166,163,.15); color: #c0c0c0; }
html[data-theme="dark"] .formcontrol { background: #1e2a4a; border-color: rgba(164,166,163,.15); color: #c0c0c0; }
html[data-theme="dark"] g.icon, html[data-theme="dark"] path.icon, html[data-theme="dark"] rect.icon, html[data-theme="dark"] circle.icon, html[data-theme="dark"] polygon.icon, html[data-theme="dark"] ellipse.icon, html[data-theme="dark"] textpath.icon { fill: #9ca89c; }
html[data-theme="dark"] g.icon-outline, html[data-theme="dark"] path.icon-outline, html[data-theme="dark"] rect.icon-outline, html[data-theme="dark"] circle.icon-outline, html[data-theme="dark"] polygon.icon-outline, html[data-theme="dark"] ellipse.icon-outline, html[data-theme="dark"] textpath.icon-outline { stroke: #9ca89c; }
html[data-theme="dark"] .nav-icon { fill: #9ca89c; }
html[data-theme="dark"] a { color: #6db3f8; }
html[data-theme="dark"] .meta-content a { color: #6db3f8; }
html[data-theme="dark"] .link-icon, html[data-theme="dark"] .userlink_icon, html[data-theme="dark"] .front-icon { filter: brightness(0.95); }
html[data-theme="dark"] .form-warning { color: #f5a0a0; }
html[data-theme="dark"] .form-confirm { color: #7ddf9b; }

/* === Search overlay === */
.search-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}
.search-overlay-inner { width: 100%; max-width: 575px; padding: 0 10px; }
#search-input:focus { border-color: #656d65; }

/* Result grid (matches TipGo icon grid) */
.search-grid {
    display: flex; flex-wrap: wrap; justify-content: flex-start;
    margin-bottom: 8px;
}
.search-block {
    width: 25%; text-align: center; cursor: pointer;
    text-decoration: none; color: inherit;
    margin: 10px 0; position: relative;
}
.search-icon {
    width: 90px; height: 90px; border-radius: 8px;
    border: 1px solid rgba(164,166,163,.3); padding: 2px;
    display: block; margin: 0 auto;
}
.search-icon-placeholder {
    background: rgba(164,166,163,.08);
}
.search-label {
    font-size: 1.2em; text-transform: lowercase;
    line-height: 1em; height: 1.8em; max-width: 95%;
    margin: .3em auto 0; color: #979894;
}
.search-group-label {
    font-size: 1.2em; color: #979894; margin: 12px 0 2px;
    padding-left: 2px; text-transform: lowercase;
}
.search-empty { text-align: center; color: #999; padding: 30px 0; font-size: 13px; }

/* Search responsive */
@media(min-width:1440px) {
    .search-overlay-inner { max-width: 800px; }
    #search-input { height: 48px; font-size: 18px; }
    .search-icon { width: 120px; height: 120px; }
    .search-label { font-size: 1.6em; line-height: .95em; height: 2.2em; margin: .4em auto 0; }
}
@media(max-width:480px) {
    .search-overlay { padding-top: 30px; }
    #search-input { height: 36px; font-size: 14px; }
    .search-icon { width: 50px; height: 50px; }
    .search-block { margin: 3px 0; }
}
@media(min-width:481px) and (max-width:767px) {
    .search-icon { width: 70px; height: 70px; }
    .search-block { margin: 5px 0; }
    .search-label { font-size: 1em; }
}

/* Search dark mode */
@media(prefers-color-scheme:dark) {
    html:not([data-theme="light"]) .search-overlay { background: rgba(26,26,46,0.98); }
    html:not([data-theme="light"]) #search-input { border-color: rgba(164,166,163,.2); background: rgba(255,255,255,.06); color: #e0e0e0; }
    html:not([data-theme="light"]) #search-input:focus { border-color: #9ca89c; }
    html:not([data-theme="light"]) .search-icon { border-color: rgba(164,166,163,.15); }
    html:not([data-theme="light"]) .search-icon-placeholder { background: rgba(255,255,255,.04); }
    html:not([data-theme="light"]) .search-empty { color: #777; }
}
html[data-theme="dark"] .search-overlay { background: rgba(26,26,46,0.98); }
html[data-theme="dark"] #search-input { border-color: rgba(164,166,163,.2); background: rgba(255,255,255,.06); color: #e0e0e0; }
html[data-theme="dark"] #search-input:focus { border-color: #9ca89c; }
html[data-theme="dark"] .search-icon { border-color: rgba(164,166,163,.15); }
html[data-theme="dark"] .search-icon-placeholder { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .search-empty { color: #777; }
