/* =========================================================
   Vox Ansgars – style.css (organized, single-file)
   NOTE:
   - Styling is kept the same.
   - Where “last rule wins” matters, overrides are kept later
     and clearly labeled.
   ========================================================= */

/* =========================================================
   1) Theme variables
   ========================================================= */
:root {
    --color-bg: #f9f9f9;
    --color-surface: #fff;
    --color-text: #333;
    --color-primary: #2a9d8f;
    --color-primary-hover: #21867a;
    --color-header-bg: var(--color-primary);
    --color-header-text: #fff;
    --color-accent: #28a745;
    --color-accent-hover: #1e7e34;
    --color-border: #ccc;
    --color-divider: #eee;
    --color-badge-bg: #2a9d8f;
    --color-badge-admin: #5b6f89;
    --color-badge-leader: #7a5a8a;
    --color-badge-voice: #e3ecea;
    --color-message-error-bg: #ffd6d6;
    --color-message-error-text: #a10000;
    --color-message-success-bg: #d6ffd6;
    --color-message-success-text: #006600;
    --color-success: #006600;
    --color-danger: #a10000;
    --color-footer-text: #666;
}

/* Dark-mode variables (site uses dark mode) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #121212;
        --color-surface: #1e1e1e;
        --color-text: #eee;
        --color-primary: #55c8be;
        --color-primary-hover: #3aa49a;
        --color-header-bg: var(--color-primary);
        --color-header-text: #fff;
        --color-accent: #28a745;
        --color-accent-hover: #1e7e34;
        --color-border: #555;
        --color-divider: #444;
        --color-badge-bg: #55c8be;
        --color-badge-admin: #6f89a8;
        --color-badge-leader: #b08ac1;
        --color-badge-voice: #2b3a3a;
        --color-message-error-bg: #6e2e2e;
        --color-message-error-text: #ffd6d6;
        --color-message-success-bg: #2e6e2e;
        --color-message-success-text: #d6ffd6;
        --color-success: #d6ffd6;
        --color-danger: #ffd6d6;
        --color-footer-text: #aaa;
    }
}

/* =========================================================
   2) Reset / global base
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal jiggle from long strings (kept as in original) */
* { min-width: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    font-size: 18px; /* baseline */
    line-height: 1.6;
}

/* Gentle fluid type (later in original, but safe here; it only sets font-size) */
body { font-size: clamp(16px, 1.6vw + 0.2rem, 18px); }

img, video, canvas, iframe { max-width: 100%; height: auto; }

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

h1, h2 {
    margin-top: 0;
}

/* =========================================================
   3) Accessibility helpers
   ========================================================= */
.visually-hidden {
    position: absolute;
    left: -9999px;
}

/* Accessibility helper: visually hidden but still in DOM */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-primary);
    color: var(--color-header-text);
    padding: 0.5rem 1rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

/* =========================================================
   4) Layout primitives
   ========================================================= */
.container {
    max-width: 700px;
    background: var(--color-surface);
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Shared overflow wrapping */
.container, .group-tile, .song-item, .inline-edit, .voice-controls { overflow-wrap: anywhere; }

/* Utility */
.hidden { display: none; }

/* =========================================================
   5) Topbar / header / nav
   ========================================================= */
header {
    background-color: var(--color-header-bg);
    color: var(--color-header-text);
    padding: 1rem 0;
    margin-bottom: 1rem;
    position: relative;
}

nav.nav-links { flex: 1; }

.bar-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
}

.brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--color-header-text);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-header-text);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.nav-links a[aria-current="page"] {
    background-color: var(--color-primary-hover);
}

.nav-links a:hover,
.nav-links a:focus {
    background-color: var(--color-primary-hover);
}

.nav-links a .badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin: 0;
}

.icon {
    width: 1rem;
    height: 1rem;
}

/* --- Mobile-friendly topbar: keep everything accessible --- */
.topbar { position: sticky; top: 0; z-index: 10; }

.bar-inner {
  max-width: 100%;
  padding: 0 .5rem;
  gap: .5rem;
}

.nav-links ul {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  gap: .5rem;
  padding-bottom: .25rem; /* thumb room */

  /* Optional: subtle fade edges to hint horizontal scroll */
  mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
}

.nav-links a {
  flex: 0 0 auto;         /* prevent squish, allow scroll */
  padding: .4rem .6rem;
}

/* Hide text labels on very narrow screens (icons remain, badges stay) */
@media (max-width: 480px) {
  .nav-links a span:not(.visually-hidden) { display: none; }
  .nav-links a { padding: .5rem; }          /* tighter hit area */
}

/* Keep message badge visible and positioned on tiny screens */
.nav-links a .badge {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}

/* Respect iOS safe areas for topbar on notched phones */
.topbar {
  padding-left: calc(1rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1rem + env(safe-area-inset-right, 0px));
}

/* =========================================================
   6) Forms & inputs
   ========================================================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group.drag {
    border: 2px dashed var(--color-primary);
    padding: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="checkbox"] {
    width: auto;
}

.form-group input[type="checkbox"] + label {
    display: inline-block;
    margin: 0 0 0 0.5rem;
    font-weight: normal;
}

.grow-textarea {
    width: 100%;
    min-height: 150px;
    max-height: 40vh;
    overflow-y: auto;
    resize: none;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#song-search,
#member-search {
    display: block;
    margin-bottom: 1rem;
    max-width: 300px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
    color: var(--color-text);
}

@media (max-width: 600px) {
    #song-search,
    #member-search { max-width: 100%; }
}



/* =========================================================
   Dropdowns (native <select>)
   Notes:
   - Native dropdown *menus* (the opened list + hover highlight) are OS-controlled in many browsers.
   - This patch styles the closed control everywhere, and styles the opened options where supported.
   ========================================================= */

/* Base select styling (matches your dark UI) */
select {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 2.5rem 0.6rem 0.85rem; /* room for arrow */
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background-color: rgba(0,0,0,0.25);   /* modern “glass” feel on dark UI */
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease, transform 140ms ease;
}

/* Hover + focus */
select:hover {
  border-color: rgba(255,255,255,0.22);
  background-color: rgba(0,0,0,0.32);
}

select:focus {
  outline: none; /* you already have a global focus outline too */
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(85, 200, 190, 0.20);
}

select:active {
  transform: translateY(0.5px);
}

/* Disabled */
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Compact selects inside tight rows */
.inline-edit select,
.member-controls select {
  width: auto;
  max-width: 100%;
}

/* Arrow (inline SVG) */
select {
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.06), rgba(255,255,255,0.00)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' fill-opacity='0.9' d='M5.5 7.5 10 12l4.5-4.5 1.2 1.2L10 14.4 4.3 8.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.85rem center;
  background-size: 100% 100%, 1.1rem 1.1rem;
}

/* A nicer “open menu” look where the browser allows it */
select option,
select optgroup {
  background-color: #1b1b1b; /* consistent dark */
  color: #f2f2f2;
}

/* Hover/active highlight on options (supported in some browsers/OS combos) */
select option:hover,
select option:focus,
select option:checked {
  background: linear-gradient(90deg, rgba(85, 200, 190, 0.35), rgba(85, 200, 190, 0.12));
  color: #fff;
}

/* Optgroup label styling (where supported) */
select optgroup {
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

/* Firefox-specific: improves menu colors a bit */
@-moz-document url-prefix() {
  select {
    background-color: rgba(0,0,0,0.32);
  }
  select option,
  select optgroup {
    background-color: #1b1b1b;
    color: #f2f2f2;
  }
}

/* If a light surface ever appears, keep things readable */
.container select,
.modal-content select,
.add-panel .panel-inner select {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.03), rgba(0,0,0,0.00)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23333' fill-opacity='0.9' d='M5.5 7.5 10 12l4.5-4.5 1.2 1.2L10 14.4 4.3 8.7z'/%3E%3C/svg%3E");
}



/* Custom dropdown: keep arrow aligned and non-clickable */
.select-wrap .select-arrow {
  position: absolute;
  right: 12px;
  pointer-events: none;
  opacity: 0.85;
}



/* =========================================================
   7) Buttons & badges
   ========================================================= */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.btn:hover,
.btn:focus {
    background-color: var(--color-primary-hover);
    color: #fff;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.btn-small:hover,
.btn-small:focus {
    background-color: var(--color-primary-hover);
    color: #fff;
}

/* Later “modern” small-button tweak (kept to preserve behavior) */
.btn-small {
  padding: .5rem .75rem;
  font-size: 1rem;
  border-radius: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 44px;
    min-height: 44px;
    position: relative;
}

.icon-btn svg {
    width: 1rem;
    height: 1rem;
}

.icon-btn:hover,
.icon-btn:focus {
    background-color: var(--color-divider);
    border-radius: 4px;
}

.badge {
    display: inline-block;
    background: var(--color-badge-bg);
    color: var(--color-header-text);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.icon-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin: 0;
}

/* =========================================================
   8) Lists: songs & members
   ========================================================= */
.song-list,
.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-divider);
    padding: 0.5rem 0;
}

.song-item .actions {
    display: flex;
    gap: 0.5rem;
}

.song-item[draggable="true"] { cursor: move; }
.song-list.drag { background-color: var(--color-divider); }

/* Members list */
.member-item {
    border-bottom: 1px solid var(--color-divider);
    padding: 0.5rem 0;
}

.member-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.member-name {
    font-size: 1.125rem;
    font-weight: bold;
}

.member-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

/* Badge variants */
.badge--subtle {
    background: var(--color-divider);
    color: var(--color-text);
    margin-left: 0;
}

.badge--role { margin-left: 0; }

.badge--admin {
    background: var(--color-badge-admin);
    color: var(--color-header-text);
    margin-left: 0;
}

.badge--leader {
    background: var(--color-badge-leader);
    color: var(--color-header-text);
    margin-left: 0;
}

.badge--voice {
    background: var(--color-badge-voice);
    color: var(--color-text);
    margin-left: 0;
}

.member-voice-empty {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.member-email {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

.member-email:hover,
.member-email:focus { text-decoration: underline; }

/* =========================================================
   9) Inline editing / admin utilities
   ========================================================= */
.inline-edit {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.inline-edit input[type="text"],
.inline-edit select,
.inline-edit textarea {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
    color: var(--color-text);
}

@media (max-width: 420px) {
  .inline-edit { flex-wrap: wrap; }
  .inline-edit input[type="text"],
  .inline-edit select,
  .inline-edit textarea { min-width: 100%; }
}

/* Users admin panel bits */
.user-selector { max-width: 300px; margin-bottom: 1rem; }

.user-card {
    display: none;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 4px;
    background-color: var(--color-surface);
    max-width: 300px;
}

.admin-spaced { margin-bottom: 1rem; }

.user-card .user-email { font-weight: bold; }
.user-card .user-role { margin-left: 0.5rem; }

.user-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.voice-part-form {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.voice-part-label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.voice-part-select { min-width: 140px; }

/* =========================================================
   10) Modals / panels
   ========================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show { display: flex; }

.modal-content {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: 4px;
    max-width: 400px;
    width: 90%;
}

.modal-content textarea {
    width: 100%;
    margin-top: 0.5rem;
}

.modal-buttons {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Add-panel overlay */
.add-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.add-panel.hidden { display: none; }

.add-panel .panel-inner {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
}

.add-panel .close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.add-panel .step { display: none; }
.add-panel .step.active { display: block; }

.actions { display: flex; gap: 1rem; }
.actions button { flex: 1; }

/* =========================================================
   11) Floating action button (FAB)
   ========================================================= */
.fab-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* FAB safe-area overrides (kept) */
.fab-container {
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
}

.floating-add {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: #006400;
    color: #fff;
    border: none;
    line-height: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    padding: 0;
}

.floating-add svg {
    width: 2.5rem;
    height: 2.5rem;
}

.floating-add:hover,
.floating-add:focus { background-color: #004d00; }

.fab-menu {
    position: absolute;
    right: 0;
    bottom: 4.5rem;
    background: #006400;
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    z-index: -1;
    overflow: hidden;
}

.fab-container:hover .fab-menu,
.fab-menu:hover { display: flex; }

.fab-container:focus-within .fab-menu { display: flex; }

.fab-menu button {
    background: none;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.fab-menu button:hover,
.fab-menu button:focus { background: rgba(0,0,0,0.2); }

.add-tooltip {
    position: fixed;
    bottom: 6.5rem;
    right: 1rem;
    background: #006400;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    display: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.fab-container:hover + .add-tooltip,
.fab-container:focus-within + .add-tooltip { display: block; }

@media (max-width: 600px) {
  .floating-add { width: 3.5rem; height: 3.5rem; }
  .floating-add svg { width: 1.75rem; height: 1.75rem; }
  .fab-menu { bottom: 3.25rem; }
}

/* =========================================================
   12) Group tiles / archive UI
   ========================================================= */
.group-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.group-tile {
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-surface);
}

.group-tile > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    list-style: none;
}

.group-tile > summary::-webkit-details-marker { display: none; }

.group-tile[open] > summary { border-bottom: 1px solid var(--color-border); }

.group-tile .group-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.group-tile .actions {
    display: flex;
    gap: 0.5rem;
}

.group-tile .song-list { padding: 0 1rem 1rem; }

.empty-group {
    padding: 0 1rem 1rem;
    color: var(--color-muted);
}

/* =========================================================
   13) Messages / feedback blocks
   ========================================================= */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.message.error {
    background-color: var(--color-message-error-bg);
    color: var(--color-message-error-text);
}

.message.success {
    background-color: var(--color-message-success-bg);
    color: var(--color-message-success-text);
}

/* =========================================================
   14) Collapsibles / files / pdf
   ========================================================= */
details.collapse {
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    background-color: var(--color-surface);
}

details.collapse summary {
    cursor: pointer;
    font-weight: bold;
    margin: 0;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapse .content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    padding: 0 0.5rem 0.5rem;
}

.file-item summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-item .file-name { flex: 1; }

.pdf-frame {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

@media (max-width: 600px) { .pdf-frame { height: 65vh; } }

/* =========================================================
   15) Song page bits
   ========================================================= */
.voice-part { margin-bottom: 1rem; }

.voice-part h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.voice-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-controls audio { flex: 1; }

.variant-label {
    font-size: 0.875rem;
    white-space: nowrap;
}

.song-top h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.song-top p {
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Large song selection dropdown */
details.song-dropdown summary {
    cursor: pointer;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
}

details.song-dropdown[open] .song-options {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-top: 0.5rem;
    max-height: 20rem;
    overflow: auto;
    padding: 0.5rem;
    background-color: var(--color-surface);
    width: 100%;
}

details.song-dropdown[open] #song-search {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.song-options label {
    display: block;
    margin-bottom: 0.25rem;
}

/* Song title links: high contrast + no purple visited state */
.song-list a,
.song-list a:visited {
  color: var(--color-text);     /* or #fff if you really want white */
  text-decoration: none;
}

.song-list a:hover,
.song-list a:focus { text-decoration: underline; }

/* =========================================================
   16) Account / auth pages
   ========================================================= */
.account-section { margin-top: 1rem; }

.account-section summary {
    cursor: pointer;
    font-weight: 600;
}

.account-section[open] summary { margin-bottom: 0.5rem; }

.back-link {
    display: inline-block;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--color-primary);
}

.edit-page-btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-header-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 1rem;
}

.edit-page-btn:hover,
.edit-page-btn:focus { background: var(--color-primary-hover); }

.password-req {
    list-style: none;
    padding-left: 1rem;
    font-size: 0.9rem;
}
.password-req li { color: var(--color-danger); }
.password-req li.valid { color: var(--color-success); }

.password-error {
    color: var(--color-danger);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Login page background */
body.login-page {
    background: #333 url('/uploads/placeholder/vox-bg.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.login-page main.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    margin: 2rem auto;
    max-width: 400px;
}

@media (prefers-color-scheme: dark) {
    body.login-page main.login-main { background: rgba(30,30,30,0.9); }
}

@media (max-width: 600px) {
  body.login-page main.login-main { margin: 1rem; max-width: none; }
}

/* =========================================================
   17) Wizard (Add Song) – scoped layout
   ========================================================= */
section.wizard {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* was: overflow: hidden */
  overflow-y: visible;
}

/* Always visible title bar */
.wizard-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--color-surface);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
}

/* Scrollable middle */
.wizard-body {
  flex: 1 1 auto;
  min-height: 0;         /* keeps flex child shrinkable */
  overflow: visible;     /* vertical scroll is on section.wizard */
  padding-bottom: 1rem;
}

/* Always visible action bar */
.wizard-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--color-surface);
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-divider);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
}

.wizard-footer .btn-row {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Sticky wizard bars: safe-area padding */
.wizard-header, .wizard-footer {
  padding-left: calc(.75rem + env(safe-area-inset-left, 0px));
  padding-right: calc(.75rem + env(safe-area-inset-right, 0px));
}
.wizard-footer { padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }

/* Step 2: horizontal scroll strip for the MP3 fieldsets */
.uploads-strip {
  width: 100%;
  overflow-x: auto !important;  /* horizontal scroll lives here */
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}

.uploads-inner {
  display: inline-flex;     /* single row */
  gap: 1rem;
  padding: 0.25rem 0;
  min-width: 100%;
}

.uploads-inner fieldset.form-group {
  flex: 0 0 auto;           /* don’t shrink */
  min-width: 14rem;         /* tweak as you like (14–18rem works well) */
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.uploads-inner legend { font-weight: 600; margin-bottom: 0.25rem; }
.uploads-inner label { display: block; margin-top: 0.5rem; }

/* Keep buttons usable on small screens */
@media (max-width: 520px) {
  .wizard-footer .btn-row { justify-content: space-between; }
}

/* =========================================================
   18) Bulletin board (Anslagstavla)
   ========================================================= */
section.bulletin {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.bulletin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bulletin-title { margin: 0; }

.bulletin-subtitle {
  margin-top: .25rem;
  font-size: .95em;
  color: var(--color-footer-text);
}

.bulletin-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.bulletin-section-title { margin-top: 1.25rem; }

.bulletin-empty {
  padding: .75rem 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  color: var(--color-footer-text);
  background: var(--color-surface);
}

.bulletin-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.bulletin-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  padding: .85rem 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.bulletin-card--archived {
  opacity: .9;
  background: rgba(0,0,0,.02);
}

.bulletin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.bulletin-card-head--admin { align-items: center; }

.bulletin-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.bulletin-pin { margin-right: .35rem; }

.bulletin-meta {
  margin-top: .35rem;
  font-size: .9em;
  color: var(--color-footer-text);
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
}

.bulletin-event {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .9em;
  color: var(--color-footer-text);
  margin-top: .4rem;
}

.bulletin-body {
  margin-top: .75rem;
  white-space: pre-wrap;
  text-indent: 0;
}

.bulletin-body p {
  text-indent: 0;
  margin: 0 0 .75rem;
}
.bulletin-body p:last-child { margin-bottom: 0; }

.bulletin-attachments {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--color-divider);
}

.bulletin-attachments-title {
  font-size: .9em;
  color: var(--color-footer-text);
  margin-bottom: .35rem;
}

.bulletin-attachment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.bulletin-attachment {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .95em;
}

.bulletin-attachment a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-primary);
  text-decoration: none;
}

.bulletin-attachment a:hover,
.bulletin-attachment a:focus { text-decoration: underline; }

.bulletin-attachment-size {
  color: var(--color-footer-text);
  font-size: .85em;
}

.bulletin-attachment-actions {
  margin-left: auto;
  display: inline-flex;
  gap: .35rem;
}

.bulletin-updated { opacity: .9; }

.bulletin-admin-buttons {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bulletin-admin-buttons .icon-btn {
  padding: .35rem;
  min-width: 36px;
  min-height: 36px;
  border-radius: 6px;
}

.bulletin-admin-buttons .icon-btn:hover,
.bulletin-admin-buttons .icon-btn:focus { background-color: var(--color-divider); }

.inline-form { display: inline; }

.bulletin-errors {
  margin: 0;
  padding-left: 1.25rem;
}

.bulletin-checkbox {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  font-weight: 600;
}

/* =========================================================
   19) Custom select dropdown (Members page)
   ========================================================= */
.select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select-btn {
    width: 100%;
    min-width: 170px;
    text-align: left;

    padding: 10px 42px 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.1;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.select-btn:hover {
    border-color: rgba(255,255,255,0.28);
    background: rgba(0,0,0,0.42);
}

.select-btn:focus {
    outline: none;
    border-color: rgba(120,170,255,0.75);
    box-shadow: 0 0 0 4px rgba(120,170,255,0.18);
}

.select-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 100%;
    z-index: 50;

    display: none;
    padding: 6px;
    border-radius: 14px;

    background: rgba(10,10,12,0.92);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}

.select-wrap.is-open .select-menu { display: block; }

.select-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.92);
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.select-item:hover,
.select-item:focus {
    outline: none;
    background: rgba(255,255,255,0.08);
}

.select-item[aria-selected="true"] {
    background: rgba(120,170,255,0.16);
    color: #fff;
}

.select-wrap .select-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    width: 18px;
    height: 18px;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
}

/* =========================================================
   20) Members page UX add-ons
   ========================================================= */
.member-controls.is-sticky {
    position: sticky;
    top: 64px; /* adjust to your topbar height */
    z-index: 10; /* lower than topbar if topbar uses higher z-index */
    padding: 10px 0 12px;
    background: transparent;
    backdrop-filter: blur(6px);
}

.member-meta {
  color: rgba(255,255,255,0.70);
  font-size: 0.92rem;
  padding-left: 2px;
}

.voice-section {
  margin: 16px 0 8px;
  padding-top: 8px;
}

.voice-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,0.10);
}

.is-searching .voice-section,
.is-searching .voice-title {
  display: none !important;
}

.member-item {
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.member-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.search-hit {
  background: rgba(255, 220, 120, 0.35);
  color: #fff;
  border-radius: 4px;
  padding: 0 2px;
}

#member-empty {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
}

/* =========================================================
   21) Footer
   ========================================================= */
footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--color-footer-text);
}

/* =========================================================
   22) No-page-scroll layout (Messages uses this)
   ========================================================= */
body.no-page-scroll {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.no-page-scroll main.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 700px;
    padding: 1rem;
    overflow: hidden;
}

/* Messages page: remove footer so chat can reach bottom */
body.no-page-scroll footer { display: none; }

/* =========================================================
   23) Responsive / small-screen tweaks (general)
   ========================================================= */
@media (max-width: 600px) {
  .container {
    margin: .75rem auto;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
  }
  header { padding: .5rem 0; margin-bottom: .5rem; }
  .btn { font-size: 1rem; padding: .65rem 1rem; }
  .btn-small { font-size: .95rem; padding: .5rem .75rem; }

  .group-tile > summary { padding: .75rem; }
  .song-item { padding: .5rem 0; }
  .song-item .actions { gap: .25rem; }

  details.song-dropdown summary { padding: .5rem; }
  details.song-dropdown[open] .song-options { max-height: 60vh; }
}

/* =========================================================
   24) Messages page – FINAL (last rule wins)
   IMPORTANT:
   There were multiple messages-page blocks in your file.
   This final block is kept LAST to preserve the final behavior.
   ========================================================= */

/* === Messages page: responsive height + denser spacing === */
section.messages-page {
  display: flex;
  flex-direction: column;

  /* fill viewport height within main.container (which is already flex:1 + overflow hidden) */
  height: 100%;
  min-height: 0;

  width: 100%;
  max-width: 100%;
  margin: 0 auto;

  padding: 0.75rem;              /* less padding than before */
  gap: 0.5rem;                   /* tighter overall spacing */
  background: var(--color-surface);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Make title take much less vertical space */
section.messages-page > h1 {
  margin: 0;
  font-size: 1.25rem;            /* smaller title */
  line-height: 1.2;
}

/* The scrollable messages area should take all remaining space */
.chat-list {
  flex: 1 1 auto;
  min-height: 0;                 /* CRITICAL: allows flex child to shrink + scroll */
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 0.2rem;                   /* tighter between messages */
  padding: 0;                    /* remove extra inset */
  margin: 0;
}

/* Date separators: tighter */
.chat-date {
  text-align: center;
  margin: 0.6rem 0 0.35rem;
  position: relative;
  font-size: 0.78rem;
  color: var(--color-footer-text);
}
.chat-date::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--color-divider);
}
.chat-date span {
  background: var(--color-surface);
  padding: 0 0.4rem;
  position: relative;
}

/* Message bubble: smaller padding */
.chat-message {
  padding: 0.3rem 0.55rem;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  word-wrap: break-word;

  /* If you still want the “divider list” look, keep a subtle border */
  border: 1px solid rgba(0,0,0,0.04);
}

/* Meta: tighter */
.chat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
  line-height: 1.2;
  color: var(--color-footer-text);
  opacity: 0.8;
}

/* BIG SPACE FIX: kill default <p> margins + reduce line height */
.chat-message p {
  margin: 0;
  line-height: 1.25;
}

/* Form: keep it compact and not too tall */
.message-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;

  padding: 0.5rem 0.5rem 0.6rem;
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}

/* Input: slightly smaller, still comfy */
#message-input {
  flex: 1;
  min-height: 2.25rem;
  max-height: 25vh;
  resize: none;

  padding: 0.45rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.25;
}

/* Button: compact */
.message-form .btn {
  flex-shrink: 0;
  padding: 0.55rem 0.9rem;
  font-size: 1rem;
  border-radius: 6px;
}

/* On small screens, squeeze padding a bit more */
@media (max-width: 600px) {
  section.messages-page { padding: 0.6rem; }
  section.messages-page > h1 { font-size: 1.15rem; }
  .chat-list { gap: 0.15rem; }
}

/* =========================================================
   25) Global link color fix (high contrast, elder-friendly)
   (Kept LAST to override earlier link styles)
   ========================================================= */
a,
a:visited {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus {
  color: #fff;
  text-decoration-thickness: 2px;
}

/* Safety: if a light surface appears, inherit text color instead */
.container a,
.container a:visited,
.modal-content a,
.modal-content a:visited,
.add-panel .panel-inner a,
.add-panel .panel-inner a:visited {
  color: var(--color-text);
}





/* =========================================================
   Minimal buttons (Account/settings/admin forms)
   ========================================================= */

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;

  padding: .5rem .85rem;
  border-radius: 10px;

  font-size: .95rem;
  font-weight: 600;
  line-height: 1.1;

  background: rgba(255,255,255,0.08);
  color: var(--color-text);

  border: 1px solid rgba(255,255,255,0.14);
  cursor: pointer;

  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  min-height: 40px;   /* still comfy */
  min-width: auto;    /* don't force large */
}

.btn-quiet:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-0.5px);
}

.btn-quiet:focus {
  outline: none;
  border-color: rgba(120,170,255,0.75);
  box-shadow: 0 0 0 4px rgba(120,170,255,0.18);
}

.btn-quiet:active { transform: translateY(0px); }

.btn-quiet.btn-danger {
  background: rgba(255, 70, 70, 0.10);
  border-color: rgba(255, 70, 70, 0.18);
}

.btn-quiet.btn-danger:hover {
  background: rgba(255, 70, 70, 0.16);
  border-color: rgba(255, 70, 70, 0.28);
}

/* Optional: make form buttons align nicely */
.account-section form button.btn-quiet {
  margin-top: .25rem;
}




/* =========================================================
   GLOBAL BUTTON REPLACEMENT — minimalist & modern
   Replaces old bulky buttons everywhere
   ========================================================= */

/* Base button (replaces .btn) */
.btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--color-text);

  padding: 0.45rem 0.9rem;
  border-radius: 10px;

  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;

  width: auto;
  min-width: unset;
  min-height: 36px;

  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;

  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 80ms ease;
}

/* Hover / focus */
.btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.30);
}

.btn:focus-visible {
  outline: none;
  border-color: rgba(120,170,255,0.75);
  box-shadow: 0 0 0 4px rgba(120,170,255,0.18);
}

/* Active */
.btn:active {
  transform: translateY(0.5px);
}

/* Disabled */
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------------------------------------------------------
   Primary intent (formerly "main action")
   --------------------------------------------------------- */
.btn-primary,
.btn:not(.cancel):not(.danger):not(.icon-btn) {
  background: rgba(85,200,190,0.18);
  border-color: rgba(85,200,190,0.35);
  color: #fff;
}

.btn-primary:hover,
.btn:not(.cancel):not(.danger):not(.icon-btn):hover {
  background: rgba(85,200,190,0.28);
}

/* ---------------------------------------------------------
   Secondary / cancel buttons
   --------------------------------------------------------- */
.btn.cancel {
  background: transparent;
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
}

.btn.cancel:hover {
  background: rgba(255,255,255,0.08);
}

/* ---------------------------------------------------------
   Destructive actions (delete, remove)
   --------------------------------------------------------- */
.btn.danger,
.btn-delete {
  background: rgba(180,60,60,0.18);
  border-color: rgba(180,60,60,0.45);
  color: #fff;
}

.btn.danger:hover,
.btn-delete:hover {
  background: rgba(180,60,60,0.30);
}

/* ---------------------------------------------------------
   Block buttons (ONLY where explicitly used)
   --------------------------------------------------------- */
.btn-block {
  display: flex;
  width: 100%;
}

/* ---------------------------------------------------------
   Small buttons (same style, tighter)
   --------------------------------------------------------- */
.btn-small {
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 8px;
  min-height: 32px;
}

/* ---------------------------------------------------------
   Icon-only buttons (keep minimal)
   --------------------------------------------------------- */
.icon-btn {
  background: transparent;
  border: none;
  padding: 0.35rem;
  min-width: 32px;
  min-height: 32px;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
}




/* =====================================================
   Form controls glow-up v2 (replace previous block)
   - Minimal, smooth, modern
   - Checkboxes + file upload
   ===================================================== */

/* ---------- CHECKBOXES (minimal + smooth) ---------- */

input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.04);
  display:inline-grid;
  place-content:center;
  vertical-align:middle;
  cursor:pointer;

  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .06s ease;
}

/* subtle “glass” highlight */
input[type="checkbox"]{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 0 rgba(42,157,143,0);
}

input[type="checkbox"]:hover{
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.06);
}

input[type="checkbox"]:active{
  transform: scale(.96);
}

/* crisp checkmark (not a filled square) */
input[type="checkbox"]::before{
  content:"";
  width:9px;
  height:5px;
  border-left:2px solid rgba(255,255,255,.95);
  border-bottom:2px solid rgba(255,255,255,.95);
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .14s ease;
  margin-top:-1px;
}

input[type="checkbox"]:checked{
  border-color: rgba(42,157,143,.9);
  background: rgba(42,157,143,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 4px rgba(42,157,143,.18);
}

input[type="checkbox"]:checked::before{
  transform: rotate(-45deg) scale(1);
}

input[type="checkbox"]:focus-visible{
  outline:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 4px rgba(120,170,255,.22);
}

/* nicer spacing for checkbox + label patterns you already use */
.small-check{
  gap:.55rem;
}
label > input[type="checkbox"],
.small-check input[type="checkbox"]{
  margin: 0 .45rem 0 0;
}


/* ---------- FILE UPLOAD (clean “button” + subtle) ---------- */

input[type="file"]{
  color: rgba(255,255,255,.88);
  font-size: .92rem;
}

/* Chrome/Edge/Safari */
input[type="file"]::file-selector-button{
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);

  padding: .45rem .70rem;
  border-radius: .55rem;
  cursor: pointer;

  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .01em;

  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .06s ease;
}

input[type="file"]::file-selector-button:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.30);
}

input[type="file"]::file-selector-button:active{
  transform: scale(.98);
}

input[type="file"]:focus-visible{
  outline:none;
}

/* Focus ring on the button feel */
input[type="file"]:focus-visible::file-selector-button{
  box-shadow: 0 0 0 4px rgba(120,170,255,.18);
  border-color: rgba(120,170,255,.55);
}

/* Safari fallback older webkit button */
input[type="file"]::-webkit-file-upload-button{
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: .45rem .70rem;
  border-radius: .55rem;
  cursor: pointer;
}

/* make filename text sit nicer */
input[type="file"]::-webkit-file-upload-button{
  margin-right: .6rem;
}



/* =====================================================
   edit_song.php PDF preview dropdown (details/summary) polish
   ===================================================== */

.pdf-acc summary{
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .06s ease;
}

/* Make the “Förhandsvisa” row feel clickable */
.pdf-acc summary:hover{
  background: rgba(255,255,255,.07);
  border-bottom-color: rgba(255,255,255,.10);
  transform: translateY(-1px);
}

.pdf-acc summary:active{
  transform: translateY(0);
}

/* Keyboard focus */
.pdf-acc summary:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(120,170,255,.18);
}

/* Chevron brighter + reacts to hover */
.pdf-acc .chev{
  stroke: rgba(255,255,255,.75);
  transition: transform .15s ease, stroke .18s ease, opacity .18s ease;
  opacity: .9;
}

.pdf-acc summary:hover .chev{
  stroke: rgba(255,255,255,.92);
}

/* Optional: ensure the label text is not “disabled gray” */
.pdf-acc summary span{
  color: rgba(255,255,255,.90);
}



/* =========================================================
   GLOBAL TYPE + BUTTON SIZE BUMP (subtle, responsive)
   Put this at the VERY END of style.css
   ========================================================= */

/* Slightly larger default text, still responsive */
body {
  font-size: clamp(17px, 1.2vw + 0.45rem, 19px);
}

/* Buttons: a tiny bump, still compact */
.btn,
.btn-small,
.btn-quiet,
.select-btn,
.select-item {
  font-size: 1.02em; /* relative to body */
}

/* Form controls: match the slightly bigger text */
input,
select,
textarea,
.grow-textarea,
#message-input {
  font-size: 1.02em;
}

/* Keep tap targets comfy (you already do this in places, but this ensures consistency) */
.btn,
.btn-small,
.btn-quiet,
select,
.select-btn {
  min-height: 40px;
}


/* Optional: slightly bigger nav labels (helps scanning) */
.nav-links a { font-size: 1.05em; }

/* Optional: a touch more line-height inside inputs/textareas */
input, textarea, select { line-height: 1.25; }




/* =========================================================
   SUBTLE CONTRAST BOOST (elder-friendly, dark UI safe)
   ========================================================= */

/* Secondary text: slightly brighter */
.member-meta,
.bulletin-subtitle,
.bulletin-meta,
.bulletin-event,
.bulletin-attachment-size,
.chat-meta,
.chat-date,
.variant-label,
.voice-part-label,
.password-req,
.password-error,
.member-email,
.empty-group {
  color: rgba(255,255,255,0.82);
}

/* Muted text (still muted, but readable) */
.badge--subtle,
.member-voice-empty,
.bulletin-empty,
#member-empty {
  color: rgba(255,255,255,0.78);
}

/* Dividers a touch clearer */
:root {
  --color-divider: rgba(255,255,255,0.16);
}

/* Borders on dark surfaces: tiny boost */
.container,
.group-tile,
.bulletin-card,
.member-item,
.song-item,
details.collapse {
  border-color: rgba(255,255,255,0.16);
}
