/* ---------------------------------------------------------
   GLOBALS
---------------------------------------------------------- */

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background-color: #f5f5f5;
  color: #111;
}

.layout {
  display: flex;
  min-height: 100vh;
  background-color: #f5f5f5;
}

main {
  flex: 1;
  background: white;
  margin: 24px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ---------------------------------------------------------
   SIDEBAR
---------------------------------------------------------- */

.sidebar {
  width: 220px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  margin: 24px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: fit-content;
}

.sidebar h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background-color: rgba(96, 112, 105, 0.85);
  color: #f7f77a;
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.2s;
}

.sidebar a {
  text-decoration: none;
  color: #111827;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.sidebar a:hover {
  background-color: #f3f4f6;
}

.sidebar a.active {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* Menu links */
.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111;
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.2s;
}

.menu-item:hover {
  background: #f6f6f6;
}

/* Log ud-knap */
form .menu-item {
  background-color: rgba(96, 112, 105, 0.85);
  border: none;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: #f7f77a;
  cursor: pointer;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.2s;
}

form .menu-item:hover {
  background: #f6f6f6;
  color: #111;
}

/* ---------------------------------------------------------
   CONTENT
---------------------------------------------------------- */

.content {
  flex: 1;
  padding: 2rem;
  background-color: white;
}

.footer {
  text-align: center;
}

/* ---------------------------------------------------------
   NEW POST BOX
---------------------------------------------------------- */

.new-post {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.new-post textarea {
  resize: none;
  height: 80px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* ↓ Denne er bevaret — den med hover-effekt */
.new-post button {
  background-color: rgba(96, 112, 105, 0.85);
  color: #f7f77a;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.new-post button:hover {
  background-color: rgba(96, 112, 105, 0.95);
  transform: translateY(-2px);
}

.new-post button:active {
  transform: translateY(0);
}

.new-post-btn {
  display: inline-block;
  padding: 10px 18px;
  background-color: rgba(96, 112, 105, 0.85);
  color: #f7f77a;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.new-post-btn:hover {
  background-color: rgba(96, 112, 105, 0.95);
  transform: translateY(-2px);
}

.new-post-btn:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------
   UPLOAD — DRAG & DROP
---------------------------------------------------------- */

.dropzone {
  border: 2px dashed #d1d5db;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  color: #6b7280;
  background: #fafafa;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 0.5rem;
}

.dropzone:hover {
  background: #f0f0f0;
  border-color: #9ca3af;
}

.dropzone--active {
  background: #feffea;
  border-color: #111;
  box-shadow: 0 0 0 6px rgba(241,249,126,0.35);
}

.preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.preview__item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #e5e7eb;
}

.preview__item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.preview__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 12px;
  padding: 5px 9px;
  cursor: pointer;
  background: rgba(255,255,255,.9);
  border: 1px solid #d1d5db;
  border-radius: 999px;
}

/* ---------------------------------------------------------
   FEED + POSTS
---------------------------------------------------------- */

.feed-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 15px;
  color: #374151;
}

.post-image {
  max-height: 400px;
  width: 100%;
  object-fit: contain;
}

/* Delete button */
.delete-form {
  display: inline;
  margin-left: 10px;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color:#6b7280;
  font-size: 1.2rem;
  transition: 0.2s;
}

.delete-btn:hover {
  color:#111827;
}

/* ---------------------------------------------------------
   LOGIN / SIGNUP FORMS
---------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form label {
  font-weight: 600;
}

.form input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafafa;
  font-size: 1rem;
  transition: 0.15s border-color ease;
}

.form input:focus {
  outline: none;
  border-color: #176738;
  background: white;
}

.form button {
  background: rgba(96, 112, 105, 0.85);
  color: #f7f77a;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.form button:hover {
  background: rgba(96, 112, 105, 0.95);
}

/* ---------------------------------------------------------
   COMMENTS
---------------------------------------------------------- */

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.comment-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafafa;
  font-size: 1rem;
  transition: 0.15s border-color ease;
}

.comment-form input:focus {
  outline: none;
  border-color: #176738;
  background: white;
}

.comment-form button {
  background: rgba(96, 112, 105, 0.85);
  color: #f7f77a;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.comment-form button:hover {
  background: rgba(96, 112, 105, 0.95);
  color: white;
  transform: translateY(-2px);
}

.comment-form button:active {
  transform: translateY(0);
}

.comment-list {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 14px;
  color: #374151;
}

.comment-meta strong {
  color: #111;
}

.no-comments {
  color: #6b7280;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   TOGGLE SWITCH (LinkedIn koncept)
---------------------------------------------------------- */

.linkedin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .slider {
  background-color: #0A66C2; /* LinkedIn blå */
}

.toggle input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle-text {
  font-size: 0.95rem;
  color: #374151;
}

