/* ==============================
   GLOBAL STYLES
============================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  color: #222;
  background-color: #f4f4f4;
}

/* ==============================
   HEADER / LOGIN
============================== */
.header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #FFFFFF;
  color: #0c0c0c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-bottom: 1px solid #ccc;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.logo img {
    height: 50px; /* feste Höhe, proportional */
    width: auto;
}

.hidden { display: none; }

#auth-container {
  display: flex;
  gap: 25px; /* Abstand zwischen Login/Logout */
  align-items: center;
}

#login-form input {
  margin-right: 5px;
  padding: 5px;
  border-radius: 3px;
  border: none;
}

#login-form button {
  margin-left: 5px;
  padding: 5px 8px;
  border: none;
  background-color: #0077cc;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

#login-form button:hover {
  background-color: #005fa3;
}

#welcome-msg {
  display: flex;
  align-items: center;
  gap: 10px;
}

#welcome-msg button {
  padding: 5px 8px;
  border: none;
  background-color: #0077cc;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

#welcome-msg button:hover {
  background-color: #005fa3;
}

/* ==============================
   LAYOUT GRID
============================== */
#layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  height: calc(100vh - 60px); /* Höhe minus Header */
}

/* ==============================
   KARTE
============================== */
#map-container {
  position: relative;
  background-color: #ddd;
}

#map-container #map {
  width: 100%;
  height: 100%;
}

/* ==============================
   SEITEN-PANELS
============================== */
aside {
  overflow-y: auto;
  background-color: #fff;
  border-right: 1px solid #ccc;
  padding: 10px;
}

#right-panel {
  border-left: 1px solid #ccc;
}

/* ==============================
   CARD PANELS
============================== */
.card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.card p {
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.card.collapsed p {
  max-height: 100px; /* Vorschauhöhe */
}

.card h2 {
  font-size: 1.1em;
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.more-link {
  display: inline-block;
  margin-top: 6px;
  text-align: right;
  color: #0077cc;
  text-decoration: none;
  font-size: 0.9em;
}

.more-link:hover {
  text-decoration: underline;
}

/* ==============================
   CHAT
============================== */
.chat-section {
  display: flex;
  flex-direction: column;
  height: 220px;
}

#chat-box {
  flex: 1;
  overflow-y: auto;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
  margin-bottom: 5px;
}

.chat-message {
  margin-bottom: 4px;
}

.chat-input {
  display: flex;
}

.chat-input input {
  flex: 1;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

.chat-input button {
  background-color: #004b8d;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.chat-input button:hover {
  background-color: #002f5c;
}

/* ==============================
   TABELLEN
============================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  width: 60%;
}

td, th {
  padding: 4px;
  border-bottom: 1px solid #eee;
}

/* ==============================
   BUTTONS
============================== */
button#open-planner {
  width: 100%;
  padding: 10px;
  background-color: #0077cc;
  border: none;
  color: white;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
}

button#open-planner:hover {
  background-color: #005fa3;
}

#right-panel button {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.3s ease;
}

#right-panel button:hover {
  background-color: #005fa3;
}

#map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#map {
  width: 80%;       /* Karte nimmt 80 % der Breite */
  height: 400px;    /* Höhe reduziert */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin: 0 auto;
}
#dashboard {
  background-color: #dcdcdc;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* damit es bei kleinen Bildschirmen umbrechen darf */
  width: 100%;
}

#dashboard .card {
  flex: 1 1 30%;
  min-width: 250px;
  max-width: 320px;
}
.readiness-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.readiness-legend ul {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
#left-panel,
#right-panel {
  background-color: #cfd4da; /* dunkleres Grau */
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#left-panel .card,
#right-panel .card {
  background-color: #ffffff; /* hell für jede Card */
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.btn-register {
    padding: 5px 12px;
    border: 1px solid #28a745;
    border-radius: 4px;
    background-color: #fff;
    text-decoration: none;
    color: #28a745;
}

.btn-register:hover {
    background-color: #e6f4ea;
}

.community-name {
    flex: 1;             /* Nimmt den gesamten freien Platz zwischen Logo und Auth ein */
    text-align: center;  /* Zentriert den Text innerhalb des freien Platzes */
    margin: 0 20px;      /* Optional: minimaler Abstand zu Logo und Auth */
}

.layer-button-container {
  display: flex;
  flex-direction: column;
  gap: 10px; /* gleichmäßiger Abstand zwischen Buttons */
  align-items: stretch; /* Buttons gleich breit */
}

.reference-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    justify-content: space-between;
}

.project-card {
    flex: 1 1 calc(33% - 20px);
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.project-card h3 {
    margin: 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.project-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
}

.project-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #007BFF;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.project-link:hover {
    background-color: #0056b3;
}
