/* ==========================================================
   KruppaCloud – Backup Planner (HB + SR + Integrität)
   Add-on stylesheet for planner components.
   Depends on ./styles.css (KruppaCloud CI).
   ========================================================== */

:root{
  --bp-hb:#2F75B5;
  --bp-hb-buf:#9DC3E6;
  --bp-sr:#70AD47;
  --bp-int:#FFC000;
  --bp-carry:#B084F5;
  --bp-danger:#FF6666;

  --bp-card: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  --bp-border: rgba(229,228,239,0.14);
  --bp-inner: rgba(0,0,0,0.14);
}

.bp-wrap{ width: min(1400px, 100%); margin: 0 auto; }

.bp-card{
  border-radius: 18px;
  border: 1px solid var(--bp-border);
  background: var(--bp-card);
  box-shadow: 0 20px 70px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 16px;
}

.bp-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }

.bp-toolbar{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bp-toolbar .left,
.bp-toolbar .right{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.bp-label{
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(229,228,239,0.72);
}

.bp-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(229,228,239,0.14);
  background: rgba(0,0,0,0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.90);
}
.bp-pill--warn{
  border-color: rgba(255,102,102,0.55);
  background: rgba(255,102,102,0.10);
}

.bp-seg{
  display:flex;
  border-radius: 14px;
  border: 1px solid rgba(229,228,239,0.14);
  overflow:hidden;
  background: rgba(0,0,0,0.12);
}
.bp-seg button{
  appearance:none;
  border:0;
  padding: 10px 12px;
  background: transparent;
  color: rgba(255,255,255,0.86);
  cursor:pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.bp-seg button:hover{ background: rgba(255,255,255,0.06); }
.bp-seg button.is-active{
  background: rgba(89,255,25,0.14);
  color: rgba(255,255,255,0.95);
  box-shadow: inset 0 0 0 1px rgba(89,255,25,0.20);
}

.bp-tabs{ display:flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 14px; }
.bp-tab{
  border: 1px solid rgba(229,228,239,0.18);
  background: rgba(0,0,0,0.14);
  color: rgba(255,255,255,0.90);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.bp-tab:hover{ background: rgba(255,255,255,0.06); border-color: rgba(229,228,239,0.30); }
.bp-tab.is-active{
  border-color: rgba(89,255,25,0.40);
  background: rgba(89,255,25,0.10);
}

.bp-panel{ display:none; }
.bp-panel.is-active{ display:block; }

.bp-legend{ display:flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; }
.bp-legend-item{ display:flex; align-items:center; gap:8px; font-size: 13px; color: rgba(229,228,239,0.82); }
.bp-swatch{ width: 14px; height: 14px; border-radius: 6px; border: 1px solid rgba(229,228,239,0.22); }
.bp-swatch.hb{ background: var(--bp-hb); }
.bp-swatch.hbBuf{ background: var(--bp-hb-buf); }
.bp-swatch.sr{ background: var(--bp-sr); }
.bp-swatch.int{ background: var(--bp-int); }
.bp-swatch.carry{ background: var(--bp-carry); }

.bp-timeline{
  overflow:auto;
  border-radius: 16px;
  border: 1px solid rgba(229,228,239,0.14);
  background: rgba(0,0,0,0.12);
}
.bp-timeline-header,
.bp-sr-parallel{
  display:grid;
  grid-template-columns: repeat(24, minmax(44px, 1fr));
  gap: 0px;
  padding: 10px;
  border-bottom: 1px solid rgba(229,228,239,0.10);
}
.bp-timeline-header div{
  font-size: 11px;
  color: rgba(229,228,239,0.70);
  text-align:center;
}
.bp-sr-parallel div{
  font-size: 11px;
  font-weight: 900;
  text-align:center;
  padding: 6px 0;
  border-radius: 10px;
  border: 1px solid rgba(229,228,239,0.10);
  background: rgba(255,255,255,0.03);
}
.bp-sr-parallel div.warn{
  border-color: rgba(255,102,102,0.55);
  background: rgba(255,102,102,0.10);
}

.bp-table-wrap{
  overflow:auto;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(229,228,239,0.14);
  background: rgba(0,0,0,0.10);
}
.bp-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}
.bp-table th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(0,0,0,0.26);
  border-bottom: 1px solid rgba(229,228,239,0.14);
  padding: 10px 10px;
  font-size: 12px;
  color: rgba(229,228,239,0.82);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.bp-table td{
  border-bottom: 1px solid rgba(229,228,239,0.10);
  padding: 10px 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  vertical-align: middle;
}
.bp-table tr:hover td{ background: rgba(255,255,255,0.03); }

.bp-type{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.2px;
  border: 1px solid rgba(229,228,239,0.14);
}
.bp-type.hb{ background: rgba(47,117,181,0.18); border-color: rgba(47,117,181,0.35); }
.bp-type.sr{ background: rgba(112,173,71,0.16); border-color: rgba(112,173,71,0.35); }
.bp-type.int{ background: rgba(255,192,0,0.18); border-color: rgba(255,192,0,0.45); }
.bp-type.carry{ background: rgba(176,132,245,0.16); border-color: rgba(176,132,245,0.35); }

.bp-gantt{
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(229,228,239,0.10);
  overflow:hidden;
  position: relative;
  min-width: 520px;
}
.bp-gantt > span{
  position:absolute;
  top:0; bottom:0;
  border-radius: 999px;
}
.bp-gantt .hb{ background: var(--bp-hb); }
.bp-gantt .hbBuf{ background: var(--bp-hb-buf); }
.bp-gantt .sr{ background: var(--bp-sr); }
.bp-gantt .int{ background: var(--bp-int); }
.bp-gantt .carry{ background: var(--bp-carry); }

.bp-input, .bp-select{
  border-radius: 12px;
  border: 1px solid rgba(229,228,239,0.18);
  background: rgba(0,0,0,0.14);
  color: rgba(255,255,255,0.90);
  padding: 10px 12px;
}
.bp-input{ min-width: 220px; }
.bp-select{ min-width: 220px; }

.bp-small{ font-size: 12px; color: rgba(229,228,239,0.72); }

@media (max-width: 840px){
  .bp-table{ min-width: 880px; }
}


/* Inputs inside planner tables */
.bp-table input[type="text"],
.bp-table input[type="time"],
.bp-table input[type="number"],
.bp-table select{
  width: 100%;
  min-width: 120px;
  border-radius: 12px;
  border: 1px solid rgba(229,228,239,0.18);
  background: rgba(0,0,0,0.14);
  color: rgba(255,255,255,0.90);
  padding: 8px 10px;
}
.bp-table input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--kc-accent);
}

/* ==========================================================
   Backup Planner – Patches (No Sidebar + Hero Logo + Overview)
   ========================================================== */

/* 1) No sidebar in this repo/page */
body.bp-nosidebar .main{
  margin-left: 0 !important;
}
body.bp-nosidebar .sidebar{
  display: none !important;
}

/* 2) Hero logo: "contain" + padding + better visibility on dark glass */
.bp-hero .bp-hero-logo{
  object-fit: contain !important;
  padding: 26px !important;

  /* leichter Hintergrund, damit transparente Logos nicht "verschwinden" */
  background:
    radial-gradient(560px 280px at 50% 45%, rgba(255,255,255,0.08), transparent 70%),
    radial-gradient(820px 420px at 40% 30%, rgba(89,255,25,0.06), transparent 72%),
    rgba(0,0,0,0.10);

  border: 1px solid rgba(229,228,239,0.14);
  box-shadow: 0 24px 90px rgba(0,0,0,0.45);
}

/* 3) Tagesübersicht (eine Timeline, klickbar) */
.bp-overview{
  padding: 10px;
  border-top: 1px solid rgba(229,228,239,0.10);
}

.bp-overview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

.bp-overview-hint{
  font-size: 12px;
  color: rgba(229,228,239,0.72);
}

.bp-overview-lanes{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.bp-overview-lane{
  position: relative;
  height: 28px;
  border-radius: 14px;
  border: 1px solid rgba(229,228,239,0.10);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.00) 0%,
      rgba(255,255,255,0.00) calc(100%/24 - 1px),
      rgba(229,228,239,0.10) calc(100%/24 - 1px),
      rgba(229,228,239,0.10) calc(100%/24)
    ),
    rgba(0,0,0,0.10);
  overflow: hidden;
}

.bp-ov-item{
  position:absolute;
  top: 3px;
  bottom: 3px;

  border-radius: 12px;
  border: 1px solid rgba(229,228,239,0.18);

  padding: 0 10px;
  display:flex;
  align-items:center;

  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2px;

  color: rgba(255,255,255,0.92);
  cursor: pointer;

  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.bp-ov-item:focus-visible{
  outline: 2px solid rgba(89,255,25,0.55);
  outline-offset: 2px;
}

/* Clickable modal */
.bp-modal{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 200;
}
.bp-modal.is-open{ display:block; }

.bp-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.bp-modal__dialog{
  position: relative;
  width: min(720px, calc(100% - 28px));
  margin: 7vh auto 0;
  border-radius: 18px;
  border: 1px solid rgba(229,228,239,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  box-shadow: 0 30px 110px rgba(0,0,0,0.55);
  overflow:hidden;
}

.bp-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(229,228,239,0.12);
  background: rgba(0,0,0,0.12);
}

.bp-modal__title{
  font-weight: 900;
  letter-spacing: 0.2px;
}

.bp-modal__body{
  padding: 14px 14px 6px;
  color: rgba(229,228,239,0.88);
  line-height: 1.55;
  font-size: 14px;
}

.bp-modal__grid{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 12px;
}

.bp-modal__key{
  color: rgba(229,228,239,0.72);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.bp-modal__val{
  color: rgba(255,255,255,0.92);
  font-weight: 700;
}

.bp-modal__foot{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(229,228,239,0.12);
  display:flex;
  justify-content:flex-end;
  background: rgba(0,0,0,0.10);
}

/* Selected row highlight */
.bp-row-selected td{
  background: rgba(89,255,25,0.06) !important;
}


/* ==========================================================
   Backup Planner – Patch: Timeline alignment + modern scrollbars
   - Remove grid gaps so percent-based event blocks align 1:1 to hour markers
   - Make SR-parallel row self-explanatory + clickable
   - Style scrollbars (only visible when needed)
   ========================================================== */

/* Hour header: continuous grid, subtle separators */
.bp-timeline-header div{
  padding: 6px 0;
  border-right: 1px solid rgba(229,228,239,0.10);
  background: rgba(255,255,255,0.02);
}
.bp-timeline-header div:last-child{ border-right: 0; }

/* SR parallel row: cells become clickable, continuous */
.bp-sr-parallel div{
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(229,228,239,0.10);
  background: rgba(255,255,255,0.02);
  padding: 6px 0;
  cursor: pointer;
}
.bp-sr-parallel div:last-child{ border-right: 0; }
.bp-sr-parallel div.warn{
  border-right: 1px solid rgba(255,102,102,0.35);
  background: rgba(255,102,102,0.10);
}

/* Label row inside SR grid (spans full width) */
.bp-sr-parallel .bp-sr-parallel-label{
  grid-column: 1 / -1;
  text-align: left;
  padding: 10px 2px 8px;
  cursor: default;
  border: 0 !important;
  background: transparent !important;
  color: rgba(229,228,239,0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Modern scrollbars (when overflow is needed) */
.bp-timeline,
.bp-table-wrap{
  scrollbar-width: thin;
  scrollbar-color: rgba(229,228,239,0.32) rgba(0,0,0,0.10);
}
.bp-timeline::-webkit-scrollbar,
.bp-table-wrap::-webkit-scrollbar{
  height: 10px;
  width: 10px;
}
.bp-timeline::-webkit-scrollbar-track,
.bp-table-wrap::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.10);
  border-radius: 999px;
}
.bp-timeline::-webkit-scrollbar-thumb,
.bp-table-wrap::-webkit-scrollbar-thumb{
  background: rgba(229,228,239,0.28);
  border: 2px solid rgba(0,0,0,0.10);
  border-radius: 999px;
}
.bp-timeline::-webkit-scrollbar-thumb:hover,
.bp-table-wrap::-webkit-scrollbar-thumb:hover{
  background: rgba(229,228,239,0.40);
}

/* Modal: compact list buttons */
.bp-modal__list{
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.bp-modal__evbtn{
  text-align:left;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(229,228,239,0.18);
  background: rgba(0,0,0,0.12);
  padding: 10px 12px;
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 800;
}
.bp-modal__evbtn:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(229,228,239,0.30);
}
.bp-modal__evbtn small{
  display:block;
  margin-top: 3px;
  font-weight: 600;
  color: rgba(229,228,239,0.76);
}
