/* DLP WebGIS - Objektinfo Phase 2A/2. Originale Panel- und Attributstile. */

/* =====================================================
   3. Rechtes Objekt-Info-Panel
===================================================== */

    .info-panel {
  position: fixed;
  z-index: 1400;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100%;
  background: #ffffff;
  box-shadow: -2px 0 12px rgba(0,0,0,0.25);
  transform: translateX(100%);
  transition: transform 0.22s ease-in-out;
  display: flex;
  flex-direction: column;
}

.info-panel.open {
  transform: translateX(0);
}

.info-panel-header {
  padding: 14px 16px;
  background: #1961ac;
  color: white;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.info-panel-title {
  font-size: 17px;
  font-weight: bold;
}

.info-panel-header-text {
  min-width: 0;
  flex: 1;
}

.info-panel-subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 3px;
}

.info-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-panel-streetview {
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  width: 34px;
  height: 30px;
  border-radius: 4px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.info-panel-streetview:hover {
  background: rgba(255,255,255,0.35);
}

.info-panel-close {
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  font-size: 22px;
  line-height: 26px;
  cursor: pointer;
}

.info-panel-close:hover {
  background: rgba(255,255,255,0.35);
}

.info-panel-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  background: #f7f7f7;
}

.tab-button {
  flex: 1;
  border: none;
  border-right: 1px solid #ddd;
  padding: 10px 6px;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 13px;
}

.tab-button:last-child {
  border-right: none;
}

.tab-button.active {
  background: white;
  font-weight: bold;
  color: #1961ac;
  border-bottom: 3px solid #1961ac;
}

.tab-button.disabled {
  color: #999;
  cursor: not-allowed;
}

.info-panel-content {
  padding: 14px;
  overflow: auto;
  flex: 1;
  font-size: 13px;
}

.empty-state {
  color: #666;
  padding: 24px 8px;
  text-align: center;
}

/* QGIS GetFeatureInfo Tabellen im Panel schöner darstellen */
.info-panel-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.info-panel-content th,
.info-panel-content td {
  border-bottom: 1px solid #e5e5e5;
  padding: 6px 5px;
  vertical-align: top;
  text-align: left;
}

.info-panel-content th {
  background: #f2f5f8;
  font-weight: bold;
  color: #333;
}

.info-panel-content tr:hover td {
  background: #fafafa;
}

.object-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.object-action-button {
  border: 1px solid #1961ac;
  background: white;
  color: #1961ac;
  padding: 9px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.object-action-button:hover {
  background: #eef5fc;
}

.object-action-button.disabled {
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  background: #f8f8f8;
}


.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  overflow: hidden;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover,
.feature-card.hover {
  border-color: #1961ac;
  box-shadow: 0 2px 8px rgba(25, 97, 172, 0.25);
}

.feature-card.selected {
  border-color: #1961ac;
  box-shadow: 0 0 0 2px rgba(25, 97, 172, 0.25);
}

.feature-card-header {
  background: #f2f5f8;
  border-bottom: 1px solid #ddd;
  padding: 8px 10px;
}

.feature-card-title {
  font-weight: bold;
  color: #1961ac;
}

.feature-card-subtitle {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

.feature-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.feature-card th,
.feature-card td {
  padding: 5px 7px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  text-align: left;
}

.feature-card th {
  width: 38%;
  color: #444;
  background: #fafafa;
}

.feature-card tr:last-child th,
.feature-card tr:last-child td {
  border-bottom: none;
}


/* =====================================================
   7. Attributanzeige / Gruppen / Änderungsdarstellung
===================================================== */

.attribute-main {
  padding: 0;
}

.attribute-main table {
  width: 100%;
  border-collapse: collapse;
}

.attribute-group {
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.attribute-group summary {
  cursor: pointer;
  padding: 0;
  font-weight: bold;
  color: #1961ac;
  background: #f5f9fd;
  user-select: none;
  list-style: none;
}

/* Standard-Pfeil im Browser ausblenden */
.attribute-group summary::-webkit-details-marker {
  display: none;
}

.attribute-group summary::marker {
  display: none;
  content: "";
}
.attribute-group summary:hover {
  background: #eef5fc;
}

.attribute-group table {
  width: 100%;
  border-collapse: collapse;
}

.attribute-group th,
.attribute-group td,
.attribute-main th,
.attribute-main td {
  padding: 6px 7px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  text-align: left;
  font-size: 12px;
}

.attribute-group th,
.attribute-main th {
  width: 42%;
  color: #444;
  background: #fafafa;
}

.value-empty {
  color: #999;
  font-style: italic;
}

.value-badge {
  display: inline-block;
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: bold;
  text-align: center;
  color: #111;
  border: 1px solid rgba(0,0,0,0.25);
}

.value-badge.zk-0 {
  background: #007fff;
  color: white;
}

.value-badge.zk-1 {
  background: #3fff00;
}

.value-badge.zk-2 {
  background: #bfff00;
}

.value-badge.zk-3 {
  background: #ffff00;
}

.value-badge.zk-4 {
  background: #ff7f00;
}

.value-badge.zk-5 {
  background: #ff0000;
  color: white;
}

.qgis-legend-layer {
  margin-bottom: 10px;
  border-bottom: 1px solid #e5edf5;
  padding-bottom: 8px;
}

