/* ============================================================
   AGFEO Commons – Generic CSS Components
   Services override CSS custom properties for branding.
   ============================================================ */

@font-face {
  font-family: "VeraMono";
  src: url("fonts/VeraMono.ttf") format("truetype");
}

/* --- Brand tokens (services override these) --- */
:root {
  --brand-primary:   #083262;
  --brand-secondary: #e6440e;
  --brand-accent:    #FFD500;
  --brand-text:      #54555A;
  --brand-bg-light:  #EDEDED;
  --nav-height:      230px;
  --content-sub:     300px;
}

/* --- Base --- */
body {
  font-family: "Source Sans Pro", sans-serif;
}

a {
  text-decoration: none;
}

p {
  padding: 0;
  line-height: 140%;
}

/* --- Layout utilities --- */
.hidden       { display: none; }
.max_width    { width: 100%; }
.flex-container { display: flex; }
.inline       { display: ruby; }
.no-wrap      { white-space: nowrap; min-width: 280px; }
.button_space { margin-left: 5px; }
.table-container { margin-bottom: 20px; }

/* --- Header / Navigation structure --- */
.agfeo_logo {
  position: absolute;
  top: 55px;
  left: 30px;
  width: 235px;
  height: 70px;
}

.application-title{
  position: absolute;
  top: 55px;
  left: 350px;
  color: var(--brand-text);
  font-size: 3rem;
}

.head_group {
  height: 140px;
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 6;
  background: white;
}

.top1_gradient {
  position: relative;
  height: 35px;
  background-color: var(--brand-primary);
  background-image: linear-gradient(to right, black 0%, var(--brand-primary) 100%);
}

.top2_left {
  background-color: var(--brand-secondary);
  position: relative;
  height: 5px;
  width: 80%;
}

.top2_right {
  background-color: var(--brand-accent);
  position: relative;
  top: -5px;
  height: 5px;
  width: 20%;
  float: right;
}

/* --- Navigation --- */
.NaviCnt {
  position: fixed;
  top: 140px;
  width: 100%;
  display: flex;
  flex-direction: row;
  background: white;
  z-index: 5;
  padding-left: 15px;
  padding-right: 15px;
}

.NaviHeader {
  position: relative;
  border-left: 1px solid white;
  border-right: 1px solid white;
  border-top: 2px solid var(--brand-text);
  background: white;
  font-size: 13px;
  color: black;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  width: 100%;
  padding-top: 15px;
  padding-bottom: 15px;
  box-shadow: 7px 4px 10px var(--brand-text);
}

.NaviHeader:hover  { box-shadow: 2px 2px 2px var(--brand-text); }
.NaviHeader.active { border-top-color: var(--brand-secondary); box-shadow: 2px 2px 2px var(--brand-text); }

.NaviHeader:hover .NaviSubMenu {
  top: 50px;
  transition: top 0.1s;
  transition-timing-function: ease-out;
}

.NaviLinkCnt {
  border-left: 1px solid white;
  border-right: 1px solid white;
  float: left;
  height: 50px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  display: flex;
}

.NaviLinkCnt > a,
.NaviHeader > a {
  text-decoration: none;
  font-size: 17px;
  color: var(--brand-text);
  text-transform: uppercase;
  font-weight: 300;
  text-align: center;
  width: 100%;
  padding-top: 15px;
  padding-bottom: 15px;
}

.NaviLinkCnt:hover         { background-color: var(--brand-bg-light); }
.NaviLinkCnt.active        { background-color: var(--brand-bg-light); border-left: 3px solid var(--brand-secondary); }
.NaviHeader > a            { font-weight: 600; }

.NaviSubMenu {
  position: absolute;
  background-color: white;
  top: -350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  z-index: -1;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  box-shadow: 3px 3px 3px var(--brand-text);
}

/* --- Logout / auth area --- */
#logoutview {
  display: flex;
  align-items: center;
  gap: 8px;
  top: 71px;   /* (140px head_group - 40px Streifen) / 2 + 40 - 19 (halbe Avatar-Höhe) */
  right: 16px;
  position: absolute;
  z-index: 10;
}

#user-chip {
  position: relative;
  cursor: pointer;
}

#user-avatar {
  display: inline-block;
  position: relative;
  z-index: 21;
  width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a5a9e 0%, #083262 100%);
  color: white;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  user-select: none;
  transition: opacity 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  vertical-align: middle;
}

#user-chip:hover #user-avatar {
  opacity: 0.82;
}

#user-menu {
  display: block;
  position: absolute;
  top: 30px;
  right: 0;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  min-width: 210px;
  padding: 16px 0 6px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#user-chip:hover #user-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#user-menu-name {
  padding: 10px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #383838;
  white-space: nowrap;
}

#user-menu-role {
  padding: 0 16px 8px;
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

#user-menu hr {
  margin: 3px 0;
  border: none;
  border-top: 1px solid #f0f0f0;
}

.user-menu-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  color: #54555A;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.1s;
  text-decoration: none;
  box-sizing: border-box;
}

.user-menu-item .user-menu-icon {
  width: 16px;
  text-align: center;
  opacity: 0.65;
  font-size: 12px;
}

.user-menu-item:hover {
  background-color: #f5f5f5;
  color: #083262;
  text-decoration: none;
}

.user-menu-item:hover .user-menu-icon {
  opacity: 1;
}

.user-menu-item.danger:hover {
  background-color: #fff3f0;
  color: #c0392b;
}

.actionlink {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 13px;
  color: var(--brand-text);
}

.actionlink:hover {
  background-color: var(--brand-bg-light);
  color: var(--brand-primary);
}

#loginbutton {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: #54555A;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, border-color 0.15s;
}

#loginbutton:hover {
  background-color: #f5f5f5;
  border-color: #aaa;
}

/* --- Footer --- */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 0 0 0 32px;
  color: #2F2F2F;
}

#footer a { color: #2F2F2F; }
#footer a:hover { text-decoration: underline; }

.footer_version_tag {
  float: right;
  padding-right: 20px;
}

/* --- Content area --- */
.ContentCnt {
  width: 100%;
  position: absolute;
  top: var(--nav-height);
  padding: 20px;
  padding-bottom: 50px;
}

/* --- Login page --- */
.loginCnt {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%);
}

.loginCnt p { text-align: right; }

/* --- Commons table (.agfeo-table) --- */
.agfeo-table {
  height: min-content;
  border-collapse: unset;
  border: none;
}

.agfeo-table thead {
  position: sticky;
  top: 195px;
}

.agfeo-table th {
  background: var(--brand-primary);
  color: white;
}

.agfeo-table a { text-decoration: underline; }

.agfeo-table th a {
  color: white;
  text-decoration: none;
}

.agfeo-table tr.odd  { background: var(--brand-bg-light); }

.agfeo-table th.first_col { border-top-left-radius: 10px; }
.agfeo-table th.last_col  { border-top-right-radius: 10px; }

.agfeo-table th {
  padding: 3px;
  font-size: 14px;
  text-transform: uppercase;
  border: 2px solid var(--brand-primary);
}

.agfeo-table th.desc { border: 2px solid var(--brand-secondary); }
.agfeo-table th.asc  { border: 2px solid var(--brand-secondary); }

.agfeo-table th.orderable:hover {
  border: 2px solid var(--brand-secondary);
  transition: border 0.5s;
}

.agfeo-table td {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 320px;
  font-size: 12px;
  padding-left: 5px;
  padding-right: 5px;
}

.agfeo-table td.td-wrap {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.agfeo-table td > div {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.agfeo-table td a {
  color: var(--brand-text);
  font-weight: bold;
}

.agfeo-table .inactive_row { color: #7F7F7F; }

.agfeo-table tr.default_template { background: var(--brand-accent); }

.th-icon { text-align: center; }

/* --- Key-Value data layout --- */
.KeyValueGrid {
  display: grid;
  grid-template-columns: max-content 1fr auto;
  column-gap: 16px;
  align-items: start;
  row-gap: 1px;
}

.KeyValuePairButton {
  display: contents;
}

.KeyValuePair { display: flex; }

.grouped::after {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  background-color: #afafaf;
  margin: 3px 0;
  display: block;
}

.KeyValuePair.grouped {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #afafaf;
}

.user-data-container {
  display: flex;
  flex-direction: column;
  max-width: 700px;
}

.parameter-key {
  width: 210px;
  display: inline-block;
  font-weight: bold;
  white-space: nowrap;
}

.parameter-key-button { font-weight: bold; white-space: nowrap; }

.parameter-value-button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Parameter blocks --- */
.parameter_block-button {
  width: fit-content;
  background: var(--brand-bg-light);
  font-size: 17px;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  position: relative;
  margin-bottom: 5px;
  margin-right: 5px;
  height: fit-content;
}

.parameter_block {
  width: 100%;
  background: var(--brand-bg-light);
  font-size: 17px;
  border-radius: 6px;
  padding: 10px;
  display: grid;
  position: relative;
  margin-bottom: 5px;
  margin-right: 5px;
  height: fit-content;
}

.parameter_block .fieldWrapper > label {
  display: block;
  float: left;
  width: 150px;
}

.parameter_block .fieldWrapper > input { width: 150px; }

.parameter_block .list_header_wrapper {
  padding: 10px;
  float: left;
}

.parameter_block .list_value_wrapper {
  padding: 10px;
  float: left;
}

.parameter_wrapper { display: flex; }

/* --- List layout --- */
.list_header       { width: 330px; font-weight: bold; float: left; }
.list_header_short { width: 100px; font-weight: bold; float: left; }
.list_value        { flex: 1; float: left; }

.list_actions {
  margin-left: 5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.list_actions .btn-sm {
  width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Button utilities --- */
.btn-default { background-color: var(--brand-accent); }

/* --- Status indicators --- */
.ErrorHeader { color: var(--brand-secondary); }

.status-ok      { padding: 0 2px; color: green; }
.status-error   { padding: 0 2px; color: var(--brand-secondary); }
.status-warning { padding: 0 2px; color: var(--brand-accent); }
.status-unknown { padding: 0 2px; color: #2F2F2F; }

.warning { color: #cf3d0d; font-weight: bold; }
.enabled { color: green;   font-weight: bold; }

.cell_warning { font-weight: bold; border: 2px solid var(--brand-accent); }
.cell_error   { font-weight: bold; border: 2px solid var(--brand-secondary); }

td.value-cell   { text-align: right; }
td.complex-cell { padding: 0; }

/* --- Action containers --- */
.actions_container {
  display: flex;
  flex-direction: column;
  width: fit-content;
  margin-right: 15px;
  border-right:   1px solid darkgray;
  border-bottom:  1px solid darkgray;
  border-top:     1px solid darkgray;
  padding: 5px 5px 0 2px;
  height: fit-content;
  border-radius: 0 10px 10px 0;
  margin-left: -5px;
}

.actions_container button,
.actions_container a { margin-bottom: 5px; }

.actions_container .btn-primary { min-width: 45px; }

/* --- Icon / status wrappers --- */
.icon_wrapper       { width: fit-content; float: left; }
.icon_wrapper svg   { height: 1.1rem; }
.status_wrapper     { display: flex; flex-direction: row; }

/* --- HTMX loading indicators --- */
.progress {
  height: 4px;
  width: 100%;
  border-radius: 2px;
  background-clip: padding-box;
  overflow: hidden;
  position: relative;
  opacity: 0;
}

.htmx-request .progress,
.htmx-request.progress { opacity: 1; }

#loading-spinner {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
}

.htmx-request#loading-spinner { display: flex; }

.progress .indeterminate { background-color: var(--brand-primary); }

.progress .indeterminate::before {
  content: '';
  position: absolute;
  background-color: inherit;
  top: 0; left: 0; bottom: 0;
  will-change: left, right;
  animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.progress .indeterminate::after {
  content: '';
  position: absolute;
  background-color: inherit;
  top: 0; left: 0; bottom: 0;
  will-change: left, right;
  animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation-delay: 1.15s;
}

@keyframes indeterminate {
  0%   { left: -35%;  right: 100%; }
  60%  { left: 100%;  right: -90%; }
  100% { left: 100%;  right: -90%; }
}

@keyframes indeterminate-short {
  0%   { left: -200%; right: 100%; }
  60%  { left: 107%;  right: -8%; }
  100% { left: 107%;  right: -8%; }
}

/* --- Progress bar (wizard / update steps) --- */
.progress.progress-bar-cnt {
  height: 25px;
  border-radius: 4px;
  margin-bottom: 20px;
  opacity: 1;
}

.progress-bar {
  border-top-right-radius: 4px;
  background-color: var(--brand-primary);
  line-height: 25px;
  width: 30%;
}

/* --- Form layout --- */
.form-group { margin-bottom: 0; }

.form-group > label  { min-width: 160px; }
.form-group > select { max-width: 300px; }

.fieldWrapper > label { width: 200px; }
.fieldWrapper > input { width: 200px; }

.form-cols {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.form-container {
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 4px;
  background-color: #fcfcfc;
}

.pwd-form label {
  font-weight: bold;
  min-width: 200px;
}

/* --- Django admin-style form helpers --- */
.module {
  border: none;
  margin-bottom: 30px;
}

fieldset {
  margin: 0 0 0;
  min-width: 0;
  padding: 0;
  border: none;
  border-top: 1px solid var(--hairline-color, #eee);
  width: 600px;
}

.aligned label {
  display: block;
  padding: 4px 10px 0 0;
  min-width: 160px;
  width: 160px;
  word-wrap: break-word;
  line-height: 1;
}

.required label, label.required { font-weight: bold; }

.aligned .form-row input { margin-bottom: 0; }

.form-row {
  overflow: hidden;
  padding: 10px;
  font-size: 0.8125rem;
}

form .aligned ul li { list-style: none; }

form .aligned p.help,
form .aligned div.help {
  margin-top: 0;
  margin-left: 160px;
}

.help, p.help, form p.help,
div.help, form div.help, div.help li {
  font-size: 0.6875rem;
}

form div.help ul {
  padding-left: 0;
  margin-left: 0;
}

/* --- Tab layout --- */
.tabcontent {
  display: none;
  width: 100%;
  padding: 6px 12px;
  animation: fadeEffect 0.3s;
}

@keyframes fadeEffect {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav-tabs      { top: -40px; position: relative; }
.nav-tabs-flush { top: 0; margin-bottom: 1rem; }

/* --- User/group config block --- */
.user_cfg_actions {
  margin-top: 20px;
  border: 1px solid #ddd;
  padding: 5px;
  width: fit-content;
  border-radius: 10px;
  background-color: #fafafa;
}

/* --- Wizard --- */
.wizard_header { width: 70%; }

.wizard-form { margin-top: 15px; }

.wizard-form label {
  font-weight: bold;
  min-width: 180px;
}

.wizard-buttons { margin-top: 20px; }
.wizard-buttons button { margin-left: 8px; }

.wizard-table { width: 100%; }

/* --- Misc utilities --- */
.Monospace { font-family: "VeraMono", sans-serif; }

.clipboard_sml {
  font-size: .775rem;
  padding: 1.5px 5px 2px;
  margin-left: auto;
}

.text-button { padding-left: 0; padding-right: 0; }

.page-link   { cursor: pointer; }
.HeaderWrapper { margin-top: 20px; }
.note_card   { display: flex; }
.pbx_link_cnt { display: flex; justify-content: space-between; }

.badge { font-size: 100%; }

.container { max-width: 1310px; }

/* --- Search --- */
.SearchSystemCnt { display: flex; }
.SearchSystemCnt > form { width: 100%; }

.search_img {
  float: left;
  height: 32px;
  padding: 5px;
  background: var(--brand-bg-light);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.SearchSystem { float: left; position: relative; }

.SearchSystem > input {
  padding-left: 5px;
  border: none;
  background: var(--brand-bg-light);
  height: 32px;
  font-size: 17px;
  color: var(--brand-text);
  font-weight: 300;
  width: 100%;
  z-index: 5;
}

#autocomplete-suggestions {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  z-index: 4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Charts --- */
.metric_chart_cnt {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--content-sub));
}

.metric_chart {
  flex: 1;
  margin-bottom: 5px;
}

/* ============================================================
   DEPRECATED — Keine Verwendung in bekannten Services gefunden.
   Vor endgültigem Löschen prüfen, ob ein neuer Service diese
   Klassen benötigt. Stand: 2026-05-05
   ============================================================ */

/*
.NaviBlock { flex-grow: 1; }

.NavSelected { border-bottom: 5px solid var(--brand-primary); }

.button_container {
  padding: 5px 10px;
  border: 1px solid #999;
  background: var(--brand-bg-light);
  color: #000;
  text-decoration: none;
  float: left;
  margin-top: 10px;
  margin-right: 30px;
  width: 140px;
}

.button_container a {
  text-decoration: none;
  width: 100%;
  font-size: 17px;
  color: var(--brand-text);
  text-transform: uppercase;
  font-weight: 300;
}

.button_wrapper_single { display: table; }

.green_button {
  font-size: 20px;
  background-color: #85e60e;
  border-color: #78cf0d;
  color: #fff;
}
.green_button:hover { background-color: #78cf0d; }

.red_button {
  font-size: 20px;
  background-color: var(--brand-secondary);
  border-color: #cf3d0d;
  color: #fff;
}
.red_button:hover { background-color: #cf3d0d; }

.blue_button {
  font-size: 20px;
  background-color: #007bff;
  border-color: #006fe6;
  color: #fff;
}
.blue_button:hover { background-color: #006fe6; }

.yellow_button {
  font-size: 20px;
  background-color: var(--brand-accent);
  border-color: #e6c000;
  color: #fff;
}
.yellow_button:hover { background-color: #e6c000; }

.ErrorInfo { color: var(--brand-secondary); }

.actions_spacer { margin-top: 20px; }

.progress-bar-warning { background-color: yellow; }
.progress-bar-danger  { background-color: red; }
.progress-bar-success { background-color: green; }

.filter-container {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 4px;
}
*/
