/* metadata_display v1.0 */

/* Bouton */
#metadisplay_btn.metadisplay-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Overlay */
.metadisplay-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
}

/* Modale */
.metadisplay-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  width: 720px;
  max-width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  font-size: 13px;
}

/* En-tête */
.metadisplay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  background: #f7f7f7;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.metadisplay-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metadisplay-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.metadisplay-close:hover { color: #000; }

/* Corps scrollable */
.metadisplay-body {
  overflow-y: auto;
  padding: 12px 16px;
  flex: 1;
}

/* Sections */
.metadisplay-section {
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
}

.metadisplay-section-title {
  padding: 7px 12px;
  background: #eef0f3;
  font-weight: bold;
  font-size: 12px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metadisplay-section-title.collapsible {
  cursor: pointer;
  user-select: none;
}
.metadisplay-section-title.collapsible:hover { background: #e2e5ea; }

.metadisplay-chevron {
  display: inline-block;
  transition: transform 0.15s;
  font-size: 10px;
  margin-right: 4px;
}
.metadisplay-chevron.open { transform: rotate(90deg); }

.metadisplay-section-content {
  padding: 4px 0;
}

/* Tableau */
.metadisplay-table {
  width: 100%;
  border-collapse: collapse;
}

.metadisplay-table tr:nth-child(even) { background: #f9f9f9; }

.metadisplay-key {
  padding: 4px 10px;
  width: 38%;
  font-weight: 600;
  color: #555;
  vertical-align: top;
  white-space: nowrap;
  border-right: 1px solid #eee;
}

.metadisplay-val {
  padding: 4px 10px;
  color: #222;
  word-break: break-all;
}

/* Géolocalisation */
.metadisplay-decimal {
  color: #999;
  font-size: 11px;
}

.metadisplay-gps-links {
  padding: 6px 10px 8px;
  display: flex;
  gap: 12px;
}

.metadisplay-map-link {
  display: inline-block;
  padding: 4px 10px;
  background: #2a6099;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.metadisplay-map-link:hover { background: #1d4a73; }

/* Visages tagués */
.metadisplay-faces-header th {
  padding: 4px 10px;
  background: #e8edf3;
  font-weight: 600;
  font-size: 11px;
  color: #444;
  text-align: left;
  border-bottom: 1px solid #d0d6de;
}

.metadisplay-face-name {
  padding: 5px 10px;
  font-weight: 600;
  color: #2a6099;
  white-space: nowrap;
}

.metadisplay-faces tr:nth-child(even) { background: #f9f9f9; }
.metadisplay-faces tr:hover { background: #eef3fa; }

/* XMP brut */
.metadisplay-xmp {
  background: #f4f4f4;
  padding: 10px 12px;
  font-size: 10px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
}

.metadisplay-empty {
  color: #999;
  font-style: italic;
  padding: 6px 12px;
  margin: 0;
}
