/* -------------------------------------------------------- */
/* UPDATE LOG                                               */
/* -------------------------------------------------------- */

/* Header row ------------------------------------------------ */
.update-log-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(28, 12, 1, 0.2);
}

.update-log-title {
  font-family: var(--heading-font);
  font-size: 1.15em;
  font-weight: 700;
  color: var(--IB-text-alt);
  margin: 0;
}

.update-log-subtitle {
  font-size: 0.78em;
  color: var(--IB-text);
  opacity: 0.6;
  font-style: italic;
}

/* Disclaimer blurb ----------------------------------------- */
.ul-disclaimer {
  font-size: 0.8em;
  color: var(--IB-text);
  opacity: 0.65;
  font-style: italic;
  text-align: center;
  margin-bottom: 12px;
}

/* Scrollable entry list ------------------------------------ */
#update-log-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;

  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 12, 1, 0.25) transparent;
}

#update-log-list::-webkit-scrollbar {
  width: 6px;
}

#update-log-list::-webkit-scrollbar-track {
  background: transparent;
}

#update-log-list::-webkit-scrollbar-thumb {
  background-color: rgba(28, 12, 1, 0.25);
  border-radius: 99px;
}

#update-log-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(28, 12, 1, 0.45);
}

.ul-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--btn-background-1);
  border: 2px solid rgba(28, 12, 1, 0.18);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.875em;
  transition: border-color 0.15s ease, background 0.15s ease;
  animation: ul-fadein 0.25s ease both;
}

@keyframes ul-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Type badge ------------------------------------------------ */
.ul-badge {
  display: inline-block;
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.6;
}

.ul-badge-new    { background: rgba(76, 140, 74, 0.2);  color: #2d5a2b; border: 1.5px solid rgba(76, 140, 74, 0.6);  }
.ul-badge-update { background: rgba(134, 93, 33, 0.18); color: #5a3810; border: 1.5px solid rgba(134, 93, 33, 0.5);  }
.ul-badge-fix    { background: rgba(192, 114, 88, 0.2); color: #7a3220; border: 1.5px solid rgba(192, 114, 88, 0.6); }
.ul-badge-wip    { background: rgba(90, 58, 41, 0.12);  color: #4b2e12; border: 1.5px solid rgba(90, 58, 41, 0.3);   }
.ul-badge-bulk    { background: rgba(141, 102, 70, 0.2);  color: #231203; border: 1.5px solid rgba(46, 23, 10, 0.3);   }

/* Date ------------------------------------------------------ */
.ul-date {
  flex-shrink: 0;
  font-size: 0.78em;
  color: var(--IB-text);
  opacity: 0.6;
  padding-top: 3px;
  white-space: nowrap;
}

/* Text ------------------------------------------------------ */
.ul-text {
  flex: 1;
  color: var(--IB-text-alt);
  line-height: 1.5;
  padding-top: 2px;
}

.ul-text a {
  color: var(--link-color);
  text-decoration: underline dotted;
}

/* State messages ------------------------------------------- */
.ul-loading,
.ul-empty,
.ul-error {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: var(--IB-text);
  opacity: 0.7;
}

.ul-error {
  background: rgba(192, 114, 88, 0.12);
  border: 2px solid var(--IB-warning);
  border-radius: 10px;
  color: var(--IB-warning);
  opacity: 1;
}

/* Two-column log row --------------------------------------- */
.log-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  width: 100%;
}

/* Status log takes 1/3 */
.log-col-status {
  flex: 1;
  min-width: 0;
  border-right: 2px solid rgba(28, 12, 1, 0.15);
  padding-right: 18px;
  margin-right: 18px;
}

/* Update log takes 2/3 */
.log-col-updates {
  flex: 2;
  min-width: 0;
}

/* Status log header ---------------------------------------- */
.status-log-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(28, 12, 1, 0.2);
}

.status-log-title {
  font-family: var(--heading-font);
  font-size: 1.15em;
  font-weight: 700;
  color: var(--IB-text-alt);
  margin: 0;
}

.status-log-subtitle {
  font-size: 0.78em;
  color: var(--IB-text);
  opacity: 0.6;
  font-style: italic;
}

/* Scrollable status list ----------------------------------- */
#status-log-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;

  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 12, 1, 0.25) transparent;
}

#status-log-list::-webkit-scrollbar {
  width: 6px;
}

#status-log-list::-webkit-scrollbar-track {
  background: transparent;
}

#status-log-list::-webkit-scrollbar-thumb {
  background-color: rgba(28, 12, 1, 0.25);
  border-radius: 99px;
}

#status-log-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(28, 12, 1, 0.45);
}

.sl-post {
  background: var(--btn-background-1);
  border: 2px solid rgba(28, 12, 1, 0.18);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.875em;
  animation: sl-fadein 0.25s ease both;
  transition: border-color 0.15s ease, background 0.15s ease;
}

@keyframes sl-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Post header (date) --------------------------------------- */
.sl-post-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(28, 12, 1, 0.18);
}

.sl-avatar {
  font-size: 1em;
  line-height: 1;
}

.sl-handle {
  font-size: 0.78em;
  font-weight: 700;
  color: var(--IB-text-alt);
  opacity: 0.75;
}

.sl-date {
  font-size: 1em;
  color: var(--IB-text);
  opacity: 0.8;
  white-space: nowrap;
}

/* Post body ------------------------------------------------- */
.sl-post-body {
  color: var(--IB-text-alt);
  line-height: 1.55;
  word-break: break-word;
  padding-top: 8px;
  border-top: 1px solid rgba(28, 12, 1, 0.18);
}

.sl-post-body a {
  color: var(--link-color);
  text-decoration: underline dotted;
}

/* State messages ------------------------------------------- */
.sl-loading,
.sl-empty,
.sl-error {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: var(--IB-text);
  opacity: 0.7;
}

.sl-error {
  background: rgba(192, 114, 88, 0.12);
  border: 2px solid var(--IB-warning);
  border-radius: 10px;
  color: var(--IB-warning);
  opacity: 1;
}

/* Mobile ---------------------------------------------------- */
@media (max-width: 600px) {
  .ul-date { display: none; }
  .ul-entry { gap: 8px; }
  .ul-badge { min-width: 44px; font-size: 0.72em; }
}

@media (max-width: 700px) {
  .log-row {
    flex-direction: column;
  }
  .log-col-status {
    border-right: none;
    border-bottom: 2px solid rgba(28, 12, 1, 0.15);
    padding-right: 0;
    margin-right: 0;
    padding-bottom: 18px;
    margin-bottom: 18px;
  }
}

/* ======================================================== */
/* LOG ARCHIVE (LogArchive.html)                            */
/* ======================================================== */

/* Utility ------------------------------------------------- */
.la-hidden {
  display: none !important;
}

/* Tab buttons --------------------------------------------- */
.la-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  justify-content: center;
}

.la-tab-btn {
  background: var(--btn-800);
  color: var(--text);
  border: 3px solid var(--ink-900);
  border-radius: 12px;
  padding: 10px 24px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.3);
}

.la-tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.35);
  border-color: var(--ui-800);
}

.la-tab-btn.active {
  background: var(--ui-800);
  color: #fff;
  border-color: var(--ui-900);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 2px 2px 5px 1px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
}

/* Archive list container ----------------------------------- */
.la-archive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Year collapsible ---------------------------------------- */
.la-year {
  background: var(--btn-background-1);
  border: 3px solid rgba(28, 12, 1, 0.6);
  border-radius: 12px;
  overflow: hidden;
}

.la-year-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--heading-font);
  font-size: 1.2em;
  font-weight: 700;
  color: var(--IB-text-alt);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}

.la-year-header::-webkit-details-marker { display: none; }

.la-year-header::before {
  content: '▾';
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.la-year:not([open]) > .la-year-header::before {
  transform: rotate(-90deg);
}

.la-year-header:hover {
  background: var(--btn-background-2);
  color: #fff;
}

.la-year-content {
  padding: 8px 15px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Month collapsible --------------------------------------- */
.la-month {
  background: var(--IB-bg-alt-3);
  border: 2px solid rgba(28, 12, 1, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

.la-month-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  font-size: 1em;
  font-weight: 600;
  color: var(--IB-text);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}

.la-month-header::-webkit-details-marker { display: none; }

.la-month-header::before {
  content: '▸';
  font-size: 0.75em;
  transition: transform 0.2s ease;
}

.la-month[open] > .la-month-header::before {
  transform: rotate(90deg);
}

.la-month-header:hover {
  background: rgba(52, 23, 4, 0.75);
  color: #fff;
}

.la-count {
  opacity: 0.6;
  font-weight: 400;
  font-size: 0.9em;
}

/* Entry list within a month ------------------------------- */
.la-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 15px 15px 15px;
}

/* Update entry -------------------------------------------- */
.la-update-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--btn-background-1);
  border: 2px solid rgba(28, 12, 1, 0.18);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.875em;
}

.la-entry-date {
  flex-shrink: 0;
  font-size: 0.78em;
  color: var(--IB-text);
  opacity: 0.6;
  padding-top: 3px;
  white-space: nowrap;
}

.la-entry-text {
  flex: 1;
  color: var(--IB-text-alt);
  line-height: 1.5;
  padding-top: 2px;
}

.la-entry-text a {
  color: var(--link-color);
  text-decoration: underline dotted;
}

/* Status post --------------------------------------------- */
.la-status-post {
  background: var(--btn-background-1);
  border: 2px solid rgba(28, 12, 1, 0.18);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.875em;
}

.la-status-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(28, 12, 1, 0.18);
}

.la-status-body {
  color: var(--IB-text-alt);
  line-height: 1.55;
  word-break: break-word;
  padding-top: 8px;
  border-top: 1px solid rgba(28, 12, 1, 0.18);
}

.la-status-body a {
  color: var(--link-color);
  text-decoration: underline dotted;
}

/* State messages ------------------------------------------ */
.la-loading,
.la-empty {
  text-align: center;
  padding: 30px;
  font-size: 0.9em;
  color: var(--IB-text);
  opacity: 0.7;
}

.la-error {
  text-align: center;
  padding: 20px;
  background: rgba(192, 114, 88, 0.12);
  border: 2px solid var(--IB-warning);
  border-radius: 10px;
  color: var(--IB-warning);
}

/* Mobile -------------------------------------------------- */
@media (max-width: 600px) {
  .la-tabs {
    gap: 8px;
  }
  .la-tab-btn {
    padding: 8px 14px;
    font-size: 0.9em;
  }
  .la-entry-date {
    display: none;
  }
  .la-update-entry {
    gap: 8px;
  }
}