/* ===== TIDLIG FACEBOOK STIL ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #e9eaed;
  font-family: 'Lucida Grande', 'Tahoma', Arial, sans-serif;
  font-size: 13px;
  color: #333;
  min-height: 100vh;
}

/* Header */
#header-bar {
  background: #b22222;
  border-bottom: 1px solid #8b0000;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
#header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 16px;
}
#header-logo {
  height: 32px;
  width: auto;
  display: block;
}
#festival-tag {
  background: #8b0000;
  color: #e0afaf;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #c05050;
}

/* Layout */
#wrapper {
  max-width: 900px;
  margin: 18px auto;
  padding: 0 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Venstre kolonne */
#left-col { width: 200px; flex-shrink: 0; }

.profile-box {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.profile-photo-big {
  background: linear-gradient(135deg, #b22222, #8b0000);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-logo {
  width: 100px;
  height: auto;
  padding: 10px;
}
.profile-name {
  padding: 8px 10px 4px;
  font-size: 16px;
  font-weight: bold;
  color: #b22222;
}
.profile-divider { border: none; border-top: 1px solid #e5e5e5; margin: 6px 10px; }
.profile-info-line {
  padding: 2px 10px;
  color: #555;
  font-size: 12px;
  line-height: 1.8;
}

/* Højre kolonne */
#right-col { flex: 1; min-width: 0; }

/* Wall box (generisk kort) */
.wall-box {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  overflow: hidden;
}
.wall-box-header {
  background: linear-gradient(to bottom, #f7f7f7, #efefef);
  border-bottom: 1px solid #d8d8d8;
  padding: 6px 12px;
  font-weight: bold;
  color: #b22222;
  font-size: 13px;
}

/* Formular */
#indlaeg-form { padding: 12px; }
#navn-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #bdc7d8;
  border-radius: 3px;
  margin-bottom: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #333;
}
#navn-input:focus, #besked-input:focus {
  outline: none;
  border-color: #b22222;
  box-shadow: 0 0 0 2px rgba(59,89,152,0.15);
}
#besked-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #bdc7d8;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  background: #fff;
  color: #333;
}
#form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
#billede-label {
  color: #b22222;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #bdc7d8;
  border-radius: 3px;
  background: #fdf0f0;
  user-select: none;
}
#billede-label:hover { background: #f5dede; }

#send-btn {
  background: linear-gradient(to bottom, #c04040, #b22222);
  color: #fff;
  border: 1px solid #8b0000;
  border-radius: 3px;
  padding: 5px 14px;
  font-size: 12px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}
#send-btn:hover { background: linear-gradient(to bottom, #d05050, #b03030); }
#send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

#billede-preview-container {
  margin: 8px 0;
  position: relative;
}
#billede-preview {
  max-width: 100%;
  max-height: 200px;
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  display: block;
}
#fjern-billede {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}

.fejl-boks {
  background: #ffecec;
  border: 1px solid #e0b0b0;
  color: #900;
  padding: 6px 10px;
  border-radius: 3px;
  margin-top: 8px;
  font-size: 12px;
}

/* Feed */
#feed-container {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  overflow: hidden;
}
#loading {
  padding: 20px;
  text-align: center;
  color: #888;
}

/* Indlæg-kort (Facebook wall post stil) */
.post {
  border-bottom: 1px solid #e5e6e9;
  padding: 12px;
  animation: fadeIn 0.3s ease;
}
.post:last-child { border-bottom: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  background: linear-gradient(135deg, #b22222, #c97070);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
  border: 1px solid #8b0000;
}
.post-meta { flex: 1; }
.post-navn {
  font-weight: bold;
  color: #b22222;
  font-size: 13px;
}
.post-navn::after { content: ' skrev på '; font-weight: normal; color: #888; }
.post-target { font-weight: bold; color: #b22222; font-size: 13px; }
.post-tid {
  color: #aaa;
  font-size: 11px;
  margin-top: 1px;
}

.post-body { margin-left: 46px; }
.post-tekst {
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-billede {
  margin-top: 8px;
  max-width: 100%;
  max-height: 400px;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  display: block;
  cursor: pointer;
}
.post-billede:hover { opacity: 0.95; }

.post-actions {
  margin-top: 8px;
  margin-left: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5e6e9;
  padding-top: 6px;
}
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #b22222;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: inherit;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}
.like-btn:hover { text-decoration: underline; }
.like-btn.liket { color: #e74c3c; }
.like-count {
  font-size: 12px;
  color: #888;
}
.like-count .like-antal { font-weight: bold; color: #555; }

/* Ingen adgang banner */
#ingen-adgang-banner {
  margin-bottom: 14px;
}
#ingen-adgang-tekst {
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #b22222;
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  z-index: 1000;
  white-space: nowrap;
}
#toast.vis { transform: translateX(-50%) translateY(0); }

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#lightbox.vis { display: flex; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 2px; }

/* Responsiv */
@media (max-width: 640px) {
  #left-col { display: none; }
  #wrapper { padding: 0 6px; margin: 8px auto; }
  .post-body { margin-left: 0; }
  .post-actions { margin-left: 0; }
}
