/* main.css */
/* ===== RESET BODY ===== */
body {
  margin: 0;
}

/* ===== HEADER BAR ===== */
.header-bar {
  /* width: 100%;
  height: 1.5cm; */
  height: 50px;
  background:
    linear-gradient(
      110deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.18) 18%,
      rgba(255,255,255,0.05) 35%,
      rgba(0,0,0,0.15) 55%,
      rgba(0,0,0,0.35) 100%
    ),
    linear-gradient(
      180deg,
      #0f0f0f 0%,
      #1f1f1f 40%,
      #2a2a2a 50%,
      #1a1a1a 65%,
      #0b0b0b 100%
    );

  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.15),
    inset 0 -3px 6px rgba(0,0,0,0.8),
    0 4px 12px rgba(0,0,0,0.5);
}

/* ===== HEADER INNER ===== */
.header-inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 8px;

  display: flex;
  align-items: center;
}

/* ===== LEFT SIDE ===== */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px; /* ← ODSTĘP LOGO ↔ NAPIS */
}

/* ===== LOGO ===== */
.header-logo {
  height: 42px;
  width: auto;
  margin-right: 12px; /* ← MAŁY ODSTĘP */
}

/* ===== TITLE ===== */
.header-title {
  font-size: 22px;
  font-weight: 600;
  color: #f0f0f0;

  letter-spacing: 0.3px;
  white-space: nowrap;

  text-shadow:
    0 1px 2px rgba(0,0,0,0.95),
    0 0 10px rgba(255,255,255,0.12);
}

/* ===== RIGHT / BOTTOM ===== */
.header-actions {
  margin-left: auto;

  display: flex;
  gap: 12px;

  padding-bottom: 8px;
  align-self: flex-end;
}

/* ===== CONTROLS ===== */
.header-actions select,
.header-actions a {
  background: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}



/* =====================================================
   Landing page – info / beta bar
   ===================================================== */

.info-bar {
  margin: 20px 0 28px;
  padding: 14px 16px;
  border-radius: 10px;

  background: linear-gradient(
    135deg,
    #eef6ff 0%,
    #f7fbff 100%
  );

  border: 1px solid #90caf9;
  color: #0d47a1;

  font-size: 14px;
  line-height: 1.45;
}

.info-bar strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.info-bar span {
  display: block;
}


/* =====================================================
   Landing page – split layout (text + image)
   ===================================================== */

.landing-split {
  display: flex;
  gap: 40px;
  align-items: center;
}

.landing-text {
  flex: 1.1;
}

.landing-image {
  flex: 0.9;
  text-align: center;
}

.landing-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

/* Mobile */
@media (max-width: 900px) {
  .landing-split {
    flex-direction: column;
  }

  .landing-image {
    margin-top: 24px;
  }
}




/* =====================================================
   App layout – uploader / jobs
   ===================================================== */

.boxes-row > .column {
  flex: 1;
}

.upload-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-collapse-btn {
  border: 0;
  background: transparent;
  padding: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upload-collapse-caret {
  color: #4b5563;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.15s ease;
}

#uploadBox.is-collapsed .upload-collapse-caret {
  transform: rotate(-90deg);
}

#uploadBox.is-collapsed #uploadPanelBody {
  display: none;
}

#jobBox.is-collapsed .upload-collapse-caret {
  transform: rotate(-90deg);
}

#jobBox.is-collapsed #jobPanelBody {
  display: none;
}


#statusCallbackBox {
  min-height: 1.4em;     /* kompaktowo: 1 linia, rośnie gdy pojawi się dłuższy status */
  max-height: 9em;
  overflow-y: auto;
}

#statusCallbackText {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}


/* =====================================================
   MT (Modification Table)
   ===================================================== */
.mt-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.mt-table th, .mt-table td {
  border-bottom: 1px solid #eee;
  padding: 6px 8px;
  text-align: right;
  white-space: nowrap;
}

.mt-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}

.mt-row-matched {
  background: #f3fff5;
}

.mt-row-unmatched {
  background: #fff5f5;
}


/* rekord matched, ale o niższej pewności */
.mt-row-warning {
  background: #fffbe6;   /* jasnożółty */
}

/* wiersz odrzucony przez użytkownika */
.mt-user-rejected {
  background: #fff5f5;   /* to samo co unmatched */
}


.mt-status-ok {
  color: #2e7d32;
  font-weight: 600;
}

.mt-status-bad {
  color: #c62828;
  font-weight: 600;
}

.mt-status-modified {
  color: #1e3a8a;
  font-weight: 600;
}
/* ===== bylo do krotrzych nazw ae chyba niepotrzebne ===== */
.file-row .upinfo {
  flex: 0 0 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ===== zabezpieczenie przed rozpychaniem okienka z nazwami plikow wczytywanych na prawa strone logu ===== */
.boxes-row {
  display: flex;
  gap: 24px;
}

.boxes-row > .column {
  flex: 1 1 0;
  min-width: 0;
}

.update-history-box {
  margin-top: 16px;
}

.history-item {
  margin-top: 6px;
}

.history-date {
  font-weight: 600;
  margin-bottom: 4px;
}

.history-text {
  white-space: pre-line;
  line-height: 1.45;
}

.history-note {
  margin-top: 10px;
}

#mtUserComment {
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 10px;
  box-sizing: border-box;
}

#mtUserComment::placeholder {
  color: #8a8f99;
  opacity: 1;
}

.history-media-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.history-media-row > #historyBox {
  flex: 1 1 0;
  min-width: 0;
}

.history-image-box {
  flex: 0 0 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-image {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
}

@media (max-width: 980px) {
  .history-media-row {
    flex-direction: column;
  }

  .history-image-box {
    flex-basis: auto;
  }
}


/* sterowanie dlugoscia paska postepu przetwarzania */
/* pełny reset */
.job-progress {
  width: 360px;
  height: 22px;
  margin: 0 8px;
  accent-color: #355a9f;
}

/* Chrome / Edge – tło */
.job-progress::-webkit-progress-bar {
  background-color: #e5e7eb;
}

/* Chrome / Edge – wypełnienie */
.job-progress::-webkit-progress-value {
  background-color: #355a9f;  /* GRANAT */
}

/* Firefox */
.job-progress::-moz-progress-bar {
  background-color:  #355a9f;
}
/*
✔ Ogranicza szerokość treści (bardziej premium wygląd)
✔ Dodaje marginesy po lewej i prawej
✔ Na dużych monitorach nie rozciąga tekstu na 100%
✔ Header zostaje full width */
.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

@media (min-width: 1400px) {
  .landing-container {
    max-width: 1280px;
  }
}
/*
position: sticky → belka „przykleja się” po dotknięciu topu
top: 0 → przyklejenie do samej góry
z-index → żeby nie chowała się pod treścią */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
}




/* ============================= */
/* ENDIAN SELECT + INFO TOOLTIP */
/* ============================= */

.endianWrap{
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
}

.endianSelect{
  padding:6px;
  min-width:110px;
}



/* Info icon */
.endian-info{
  width:20px;
  height:20px;
  border-radius:50%;
  background:#dbeafe;
  color:#7394ed;
  font-size:13px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  border:1px solid #bfdbfe;
  transition:all 0.15s ease;
}

.endian-info:hover{
  background:#bfdbfe;
  color:#1e40af;
}

/* Tooltip */
.endian-popover{
  display:none;
  position:absolute;
  top:28px;
  left:50%;
  transform:translateX(-50%);

  width:420px;          /* 👈 stała szerokość */
  max-width:90vw;       /* 👈 bezpieczne na mobile */

  padding:16px 18px;
  font-size:14px;
  line-height:1.55;
  border-radius:12px;

  white-space:pre-line; /* 👈 ważne dla \n */
  word-wrap:break-word;

  background:rgba(239,246,255,0.96);
  font-weight: 400;
  border:1px solid #bfdbfe;
  color:#1e3a8a;

  box-shadow:0 12px 28px rgba(0,0,0,0.12);
  z-index:1000;
}

.endian-popover b {
  display:block;
  margin-bottom:6px;
}

.endian-popover::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(239,246,255,0.95) transparent;
}
/* 
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 18px;
  height: 18px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  background: #d8ecff;
  color: #084b83;
  cursor: pointer;
}
*/
/* wrapper dla ikon z tooltipem */
.info-wrapper {
  position: relative;
  display: inline-block;
}

.mt-row-modified {
  background: #eef4ff;
}
