/* UDVALG CSS (v1.8) */

html, body {
  background: transparent;
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* --- RESPONSIV HEADER FADE --- */
.header-fade-right {
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

@media (min-width: 768px) {
  .header-fade-right {
    -webkit-mask-image: linear-gradient(to right, black 20%, transparent 90%) !important;
    mask-image: linear-gradient(to right, black 20%, transparent 90%) !important;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

/* --- KNAPPER --- */
.admin-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid #e5e7eb;
  background: #ffffff; color: #374151; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.admin-btn:hover { background: #f9fafb; border-color: #d1d5db; }
.admin-btn--solid { background: #2e7d32; color: #ffffff; border-color: #2e7d32; }
.admin-btn--solid:hover { background: #1b5e20; }

/* --- KORT --- */
.card {
  display: flex; background: white; padding: 16px;
  border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  align-items: center; gap: 16px; 
  position: relative; 
  transition: transform 0.2s;
}
.card:hover { border-color: #2e7d32; transform: translateY(-2px); }

.card img, .default-icon {
  width: 80px; height: 120px; border-radius: 50%;
  object-fit: cover; background: #f3f4f6; flex-shrink: 0;
}

.card-info { 
  display: flex; flex-direction: column; min-width: 0; 
}
.card-info .name { margin: 0; font-size: 16px; font-weight: 700; color: #1f2937; }
.card-info .role { font-size: 13px; font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.card-info div { font-size: 14px; color: #4b5563; }
.card-info a { color: #2e7d32; text-decoration: none; }
.card-info a:hover { text-decoration: underline; }

/* --- EDIT KNAP --- */
.card-edit {
  position: absolute; right: 10px; top: 10px;
  width: 30px; height: 30px; border-radius: 6px; 
  background: #f3f4f6; color: #374151;
  border: none; display: none; align-items: center; justify-content: center;
  cursor: pointer;
}
body.editing .card-edit { display: flex; }
body.editing .card-edit:hover { background: #2e7d32; color: white; }

/* --- DIALOGER --- */
.dialog-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 5000; backdrop-filter: blur(2px);
}
.dialog-backdrop.visible { display: flex; }

.dialog {
  background: white; width: min(600px, 90%); 
  padding: 24px; border-radius: 16px; 
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-height: 90vh; overflow-y: auto;
}

/* --- KALENDER MODE (FIX AF DOBBELT RAMME) --- */
/* Vi tvinger den ydre boks (.dialog) til at være den ENSTE synlige ramme */
.dialog-backdrop.calendar-mode .dialog {
  background: white !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  border: none !important;
  padding: 0 !important; /* Vigtigt: fjerner luft omkring iFramen */
  width: 95% !important;
  max-width: 900px !important;
  height: 90vh !important;
  max-height: 90vh !important;
  border-radius: 16px !important;
  overflow: hidden !important; /* Sikrer at iFramen ikke stikker ud over de afrundede hjørner */
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* Kalenderens indhold fylder nu dialogen 100% */
.calendar-frame-container {
  width: 100%;
  height: 100%;
  display: block;
}