/* Grundlæggende reset og boksmodellering */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body, html {
    height: 100%;
    font-family: Arial, sans-serif;
}
/* Overordnet container - sidebar + hovedindhold */
.container {
    display: flex;
    height: 100vh; /* fylder hele vinduet */
    overflow: hidden;
}
/* Sidebar */
.sidebar {
    flex: 0 0 15rem; /* Fast bredde */
    padding: 2rem 0.625rem 1.5625rem 1.5625rem;
    overflow-y: auto;
}
.sidebar h1 {
    font-size: 1em;
    margin-bottom: 0.625rem;
}
.sidebar ul {
    list-style: none;
}
.sidebar ul li {
    margin-bottom: 0.625rem;
}
/* Sidebar overskrifter */
.section-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
    color: #000;
}
/* Sidebar links */
.link-list {
    line-height: 0.7;
}
.link-list li {
    margin-bottom: 0;
}
.link-list a {
    font-size: 0.7em;
    color: #A9A9A9;
    text-decoration: none;
    font-weight: bold;
    padding: 0;
    display: inline;
}

/* Hovedindhold (alt til højre for sidebar) */
.scroll-wrapper {
  padding-left: 0;
  display: flex;
  flex-grow: 1;
  overflow-x: auto; /* Én fælles scrollbar */
  overflow-y: hidden;
  white-space: nowrap; /* Holder børn på linje */
}

/* Beskedtekst over formularen */
.text-section {
  flex: 0 0 15.625rem; /* fast bredde */
  padding: 1.25rem;
  padding-top: 1.5rem;
  padding-left: 0;
  font-size: 0.70em;
  color: #333;
  white-space: normal; /* tekst brydes som normalt */
  overflow-x: visible; /* vigtig, så tekst ikke klippes */
}

.text-section:empty {
  display: none;
}

/* Container til formular + gamle breve side om side */
.brevkasse-container {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

/* Formularsektionen */
.brevkasse-section {
    flex: 1 1 25rem;
    background-color: #fff;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 18.75rem;
    max-width: 43.75rem;
}
/* Formularens inputfelter og textarea */
.brevkasse-form {
    font-family: Arial, sans-serif;
    padding: 0.4rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.brevkasse-form input[type="text"],
.brevkasse-form textarea {
    border: 1px solid #000;
    background-color: #fff;
    color: #000;
    font-size: 0.85em;
    padding: 0.375rem;
    resize: none;
    font-family: Arial, sans-serif;
    width: 100%;
}
.brevkasse-form input[type="submit"] {
    width: fit-content;
    font-size: 0.85em;
    padding: 0.375rem 0.75rem;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
}
.brevkasse-form input[type="submit"]:hover {
    background-color: #eee;
}
/* Gamle breve-sektionen */
.gamle-breve {
    flex: 1 1 18.75rem;
    background-color: #fff;
    padding: 2rem;
    font-family: Arial;
    font-size: 0.8125rem;
    color: #444;
    overflow-y: auto; /* Gør det scrollbart hvis mange breve */
    min-width: 0;
}
.gamle-breve h2 {
    font-size: 1em;
    margin-bottom: 0.625rem;
    font-weight: bold;
}
.brev {
    margin-bottom: 1.25rem;
    background-color: #f9f9f9;
    border-left: 2px solid #ccc;
    padding: 0.625rem;
    position: relative;
}

.brev-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.brev-meta {
    white-space: pre-wrap;
    flex: 1;
}

.brev-content {
    margin: 0;
    white-space: pre-wrap;
}

/* Stemmer */
.vote-form {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
}

.vote-button {
    background: none;
    border: 1px solid #ddd;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
}

.vote-button:hover {
    background-color: #ffe0e0;
    border-color: #ff9999;
    transform: scale(1.05);
}

.vote-count {
    font-weight: bold;
}
.brev-timestamp {
    padding-right: 4rem;
}
}

/*SVAR*/
.brev-svar {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(45, 106, 79, 0.08);
    border-left: 3px solid #2d6a4f;
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
}