
/* HOSTSENTRA_WEBMAIL_UI2C */
/* Desktop navigation; existing mail reader stays unchanged. */

#mailApp.hs-ui2c .workspace {
  display: grid !important;
  grid-template-columns:
    64px
    minmax(215px, 260px)
    minmax(310px, 0.95fr)
    minmax(350px, 1.05fr) !important;
  min-width: 0;
}

#mailApp.hs-ui2c .hs-app-rail {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 17px 8px;
  background: #253247;
  border-right: 1px solid rgba(255,255,255,.09);
  box-sizing: border-box;
  overflow: hidden;
}

#mailApp.hs-ui2c .hs-app-rail-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 19px;
  background: #3768ce;
  color: white;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.5px;
}

#mailApp.hs-ui2c .hs-app-rail-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}

#mailApp.hs-ui2c .hs-app-rail-button:hover,
#mailApp.hs-ui2c .hs-app-rail-button:focus-visible {
  background: rgba(255,255,255,.13);
  color: #fff;
}

#mailApp.hs-ui2c .hs-app-rail-button.hs-selected {
  background: #3768ce;
  color: #fff;
}

#mailApp.hs-ui2c .hs-app-rail-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

#mailApp.hs-ui2c .hs-app-rail-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#mailApp.hs-ui2c .hs-app-rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#mailApp.hs-ui2c .folder-panel {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

#mailApp.hs-ui2c .message-panel {
  min-width: 0;
  grid-column: 3;
  grid-row: 1;
}

#mailApp.hs-ui2c .reader-panel {
  min-width: 0;
  grid-column: 4;
  grid-row: 1;
}

/* Less box-heavy navigation. */
#mailApp.hs-ui2c .account-card,
#mailApp.hs-ui2c .storage-card {
  box-shadow: none !important;
  border-radius: 8px !important;
}

#mailApp.hs-ui2c .folder-link {
  border-radius: 6px !important;
}

#mailApp.hs-ui2c .message-card {
  box-shadow: none !important;
  border-radius: 0 !important;
}

#mailApp.hs-ui2c .message-name {
  font-size: 13px !important;
}

#mailApp.hs-ui2c .message-subject {
  font-size: 13px !important;
}

#mailApp.hs-ui2c .message-date {
  font-size: 11px !important;
}

/* Address book is now accessible from the application rail. */
#mailApp.hs-ui2c #contactsButton {
  display: none !important;
}

/* Settings remain available from the rail; theme stays in top bar. */
#mailApp.hs-ui2c #hsSettingsButton {
  display: none !important;
}

/* Existing responsive layout is preserved on smaller screens. */
@media (max-width: 1100px) {
  #mailApp.hs-ui2c .hs-app-rail {
    display: none !important;
  }

  #mailApp.hs-ui2c .workspace {
    display: grid !important;
    grid-template-columns: revert !important;
  }

  #mailApp.hs-ui2c .folder-panel,
  #mailApp.hs-ui2c .message-panel,
  #mailApp.hs-ui2c .reader-panel {
    grid-column: auto;
    grid-row: auto;
  }

  #mailApp.hs-ui2c #contactsButton,
  #mailApp.hs-ui2c #hsSettingsButton {
    display: revert !important;
  }
}


/* HOSTSENTRA_WEBMAIL_UI2D */
/* Simple folder rows; app tiles exist only in the far-left rail. */

#mailApp.hs-ui2c .folder-panel .folder-nav,
#mailApp.hs-ui2c .folder-panel #hsExternalFolderList {
  display: flex;
  flex-direction: column;
  gap: 1px !important;
}

#mailApp.hs-ui2c .folder-panel .folder-link,
#mailApp.hs-ui2c .folder-panel .hs-ext-folder {
  width: 100%;
  min-height: 35px !important;
  padding: 5px 10px !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 9px !important;
  border: 0 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: left;
  color: var(--text) !important;
}

#mailApp.hs-ui2c .folder-panel .folder-link:hover,
#mailApp.hs-ui2c .folder-panel .hs-ext-folder:hover {
  background: var(--canvas) !important;
}

#mailApp.hs-ui2c .folder-panel .folder-link.active {
  background: var(--soft) !important;
  color: var(--accent) !important;
  font-weight: 650 !important;
}

#mailApp.hs-ui2c .folder-panel .folder-icon {
  display: inline-flex;
  width: 19px !important;
  min-width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 15px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#mailApp.hs-ui2c .folder-panel .hs-ext-folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#mailApp.hs-ui2c .folder-panel .folder-heading,
#mailApp.hs-ui2c .folder-panel .hs-ext-sidebar-heading {
  margin: 14px 0 7px !important;
  padding-left: 10px !important;
}

#mailApp.hs-ui2c .folder-panel .account-card {
  box-shadow: none !important;
}

#mailApp.hs-ui2c .hs-app-rail-button svg {
  width: 23px;
  height: 23px;
}


/* HOSTSENTRA_WEBMAIL_UI2E */
/* Farbige Kacheln nur in der aeusseren App-Leiste. */

#mailApp.hs-ui2c .hs-app-rail {
  gap: 12px !important;
}

#mailApp.hs-ui2c .hs-app-rail-button {
  border-radius: 12px !important;
  color: #ffffff !important;
  opacity: 1;
  transition: transform .15s ease, filter .15s ease;
}

#mailApp.hs-ui2c .hs-app-rail-button:nth-of-type(1) {
  background: #3569db !important;
}

#mailApp.hs-ui2c .hs-app-rail-button:nth-of-type(2) {
  background: #159b9a !important;
}

#mailApp.hs-ui2c .hs-app-rail-button:nth-of-type(3) {
  background: #d98a31 !important;
}

#mailApp.hs-ui2c .hs-app-rail-button:nth-of-type(4) {
  background: #8661c8 !important;
}

#mailApp.hs-ui2c .hs-app-rail-button:nth-of-type(5) {
  background: #41936d !important;
}

#mailApp.hs-ui2c .hs-app-rail-bottom .hs-app-rail-button {
  background: #64748b !important;
}

#mailApp.hs-ui2c .hs-app-rail-button:hover:not(:disabled) {
  filter: brightness(1.14);
  transform: translateY(-1px);
}

#mailApp.hs-ui2c .hs-app-rail-button.hs-selected {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

#mailApp.hs-ui2c .hs-app-rail-button:disabled {
  opacity: .55 !important;
  cursor: not-allowed;
}

#mailApp.hs-ui2c .hs-app-rail-button svg {
  width: 22px;
  height: 22px;
}


/* HOSTSENTRA_WEBMAIL_UI2R */
/* Nachrichtenliste bleibt sichtbar; Leser bekommt die freie Breite. */

@media (min-width: 1101px) {
  #mailApp.hs-ui2c .workspace {
    grid-template-columns:
      64px
      minmax(215px, 260px)
      minmax(260px, 300px)
      minmax(0, 1fr) !important;
    column-gap: 0 !important;
  }

  #mailApp.hs-ui2c .workspace > .message-panel {
    grid-column: 3 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  #mailApp.hs-ui2c .workspace > .reader-panel {
    grid-column: 4 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }

  #mailApp.hs-ui2c .reader-panel .message-reader {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }

  #mailApp.hs-ui2c .reader-panel .reading-scroll {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }
}


/* HOSTSENTRA_WEBMAIL_UI2Y */

/* Hintergrund nur bei geschlossener Nachricht. */
@media (min-width: 1101px) {
  #mailApp.hs-ui2c .workspace {
    position: relative;
  }

  #mailApp.hs-ui2c:not(.hs-reader-open) .workspace {
    background-image: url("/webmail/static/hostsentra-logo.png");
    background-repeat: no-repeat;
    background-position: calc(100% - 35%) center;
    background-size: 220px auto;
  }

  #mailApp.hs-ui2c.hs-reader-open .workspace {
    background-image: none !important;
  }
}


#mailApp.hs-ui2c:not(.hs-reader-open) .workspace {
  background-blend-mode: luminosity;
}


/* HOSTSENTRA_WEBMAIL_UI2Z */
/* Echtes Zahnrad, nur am Einstellungen-Button der linken App-Leiste. */
#mailApp.hs-ui2c .hs-settings-gear2z {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  isolation: isolate;
}

#mailApp.hs-ui2c .hs-settings-gear2z > * {
  visibility: hidden !important;
}

#mailApp.hs-ui2c .hs-settings-gear2z {
  font-size: 0 !important;
  color: transparent !important;
}

#mailApp.hs-ui2c .hs-settings-gear2z::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: 50%;
  left: 50%;
  width: 23px !important;
  height: 23px !important;
  transform: translate(-50%, -50%);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23F5F7FA' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-1.86 1.86-.06-.06A1.7 1.7 0 0 0 16 18.4a1.7 1.7 0 0 0-1 1.56V21h-2v-1.04A1.7 1.7 0 0 0 12 18.4a1.7 1.7 0 0 0-1 1.56V21H9v-1.04a1.7 1.7 0 0 0-1-1.56 1.7 1.7 0 0 0-1.88.34l-.06.06L4.2 16.94l.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-1.56-1H2v-2h1.04A1.7 1.7 0 0 0 4.6 11a1.7 1.7 0 0 0-.34-1.88L4.2 9.06 6.06 7.2l.06.06A1.7 1.7 0 0 0 8 7.6a1.7 1.7 0 0 0 1-1.56V5h2v1.04A1.7 1.7 0 0 0 12 7.6a1.7 1.7 0 0 0 1-1.56V5h2v1.04a1.7 1.7 0 0 0 1 1.56 1.7 1.7 0 0 0 1.88-.34l.06-.06 1.86 1.86-.06.06A1.7 1.7 0 0 0 19.4 11a1.7 1.7 0 0 0 1.56 1H22v2h-1.04A1.7 1.7 0 0 0 19.4 15Z' transform='translate(0 -1)'/%3E%3C/svg%3E") !important;
  opacity: .95;
  pointer-events: none !important;
}

#mailApp.hs-ui2c .hs-settings-gear2z:hover::after {
  opacity: 1;
}


/* HOSTSENTRA_EXTMAIL_UI3A */

/* Das vorhandene HTML-hidden muss auch gegen Formular-CSS gelten. */
#hsExternalAccountForm[hidden] {
  display: none !important;
}

/* Technische Synchronisierung bei Bedarf aufklappen. */
.hs-ext-sync-details3a {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0;
}

.hs-ext-sync-details3a > summary {
  padding: 11px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style-position: inside;
  user-select: none;
}

.hs-ext-sync-details3a > summary:hover {
  color: var(--text);
}

.hs-ext-sync-details3a[open] > summary {
  border-bottom: 1px solid var(--line);
}

.hs-ext-sync-details3a > .hs-ext-sync-panel {
  margin: 0;
  padding: 12px;
  border: 0;
}


/* HOSTSENTRA_WEBMAIL_UI3B */
/* Alte technische Synchronisationsdetails unter externen Konten ausblenden. */
/* Die Synchronisationsfunktionen selbst bleiben unveraendert. */

#hsExternalAccountsDialog .hs-ext-sync-panel,
#hsExternalAccountsList .hs-ext-sync-panel,
#hsExternalAccountsDialog .hs-ext-sync-details3a,
#hsExternalAccountsList .hs-ext-sync-details3a {
  display: none !important;
}


/* HOSTSENTRA_EXTMAIL_UI3C */
/* Sicherheitsnetz: auch dynamisch erzeugte alte Detailbereiche ausblenden. */
#hsExternalAccountsList details.hs-ext-sync-details3a,
#hsExternalAccountsList .hs-ext-sync-panel {
  display: none !important;
}


/* HOSTSENTRA_WEBMAIL_UI3E */
/* Aufklappbare Synchronisationsdetails unter den Kontokarten entfernen. */
#hsExternalAccountsList details,
#hsExternalAccountsList details.hs-ext-sync-details3a,
#hsExternalAccountsList .hs-ext-sync-panel,
#hsExternalAccountsList .hs-ext-sync-details3a {
    display: none !important;
}


/* HOSTSENTRA_WEBMAIL_UI3G */
#mailApp.hs-ui2c .hs-ext-inbox-badge3g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: auto;
  border-radius: 10px;
  box-sizing: border-box;
  background: var(--accent, #657df1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#mailApp.hs-ui2c .hs-ext-inbox-badge3g[hidden] {
  display: none !important;
}
