/* RUESS Hub 2.79.18 - Dokument-Ansicht im Hub (public/dokument-ansicht.js) und gruen umrandetes Schliessen-X ueberall (Marvin 09.11.). Laedt als letztes Stylesheet. */

/* 1) Schliessen-X: immer gleich - kleine Flaeche, gruen umrandet (alle Dialog-Arten des Hubs) */
.modal-close, .kom-dialog-close, .bw-mail-zu, .ik-zu, .rm-zu, .hilfe-zu, .fp-zu, .rd-zu, .attachment-preview-close,
button.ap-icon-btn[aria-label="Schließen"], button[aria-label="Schließen"], button[aria-label="Dialog schließen"],
button[aria-label$=" schließen"]:not(.mobile-sidebar-close) {
  border: 2px solid #a2bf13 !important;
  border-radius: 8px !important;
  min-width: 34px; min-height: 34px;
  box-sizing: border-box;
}
.modal-close:hover, .kom-dialog-close:hover, .bw-mail-zu:hover, .ik-zu:hover, .rm-zu:hover, .hilfe-zu:hover, .fp-zu:hover, .rd-zu:hover, .attachment-preview-close:hover,
button.ap-icon-btn[aria-label="Schließen"]:hover, button[aria-label="Schließen"]:hover, button[aria-label="Dialog schließen"]:hover,
button[aria-label$=" schließen"]:not(.mobile-sidebar-close):hover {
  background: rgba(162, 191, 19, .14) !important;
}

/* 2) Dokument-Ansicht */
.rd-overlay { position: fixed; inset: 0; z-index: 4000; background: rgba(20, 24, 22, .55); display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; }
.rd-dialog { background: #fff; border-radius: 14px; width: min(1200px, 96vw); height: 94vh; display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); overflow: hidden; }
.rd-kopf { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e3e8df; }
.rd-kopf h3 { margin: 0; font-size: 15px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-aktionen { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rd-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid #d6dcd2; border-radius: 8px; background: #fff; color: #263029; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.rd-btn:hover { background: #f1f5ea; }
.rd-zu { height: 34px; width: 34px; background: #fff; color: #263029; font-size: 16px; cursor: pointer; margin-left: 4px; }
.rd-inhalt { flex: 1 1 auto; overflow: auto; background: #eef1ec; padding: 12px; }
.rd-host { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rd-host .rd-seite { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); max-width: none; }
.rd-host .rd-bild { max-width: 100%; height: auto; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); background: #fff; }
.rd-hinweis, .rd-fehler { margin: 24px auto; max-width: 560px; text-align: center; color: #4f5a52; font-size: 14px; }
.rd-fehler { color: #a23a2a; }
@media (max-width: 700px) { .rd-kopf { flex-wrap: wrap; } .rd-dialog { height: 96vh; } }

/* Hub-weite Button-Regeln (gruen, volle Breite) gelten hier NICHT - kompakte, helle Knoepfe rechts (Regel: keine langen gruenen Balken) */
.rd-dialog .rd-aktionen .rd-btn, .rd-dialog .rd-aktionen a.rd-btn {
  width: auto !important; min-width: 32px !important; height: 32px !important; padding: 0 10px !important; margin: 0 !important;
  background: #fff !important; color: #263029 !important; border: 1px solid #d6dcd2 !important; border-radius: 8px !important;
  box-shadow: none !important; font-size: 13px !important; font-weight: 600 !important; line-height: 30px !important; white-space: nowrap !important; flex: 0 0 auto !important;
}
.rd-dialog .rd-aktionen .rd-btn:hover { background: #f1f5ea !important; }
.rd-dialog .rd-aktionen .rd-zu {
  width: 34px !important; min-width: 34px !important; height: 34px !important; padding: 0 !important; margin: 0 0 0 4px !important;
  background: #fff !important; color: #263029 !important; box-shadow: none !important; font-size: 16px !important; line-height: 1 !important; flex: 0 0 auto !important;
}
.rd-dialog .rd-aktionen .rd-zu:hover { background: rgba(162, 191, 19, .14) !important; }

/* 2.79.19: "Endgueltig loeschen" im Menue "Mehr" des Lieferscheins rot */
.we-mehr-menu .we-mehr-item.we-gefahr { color: #a23a2a !important; }
/* 2.79.20: Loeschen-Knopf je Lieferschein-Zeile - kompakt, rote Schrift (kein gruener Balken) */
.ap-actions .ap-btn.we-gefahr { color: #a23a2a !important; border-color: #d9b1aa !important; background: transparent !important; }
