/* ==========================================================================
   NodeSniff Top Banner
   Banner for server details panel only
   ========================================================================== */

/* Host wrapper – same spacing rhythm as other details blocks */
.ns-top-banner-host {
  width: 100%;
  margin: 0 0 4px 0;
  padding: 0;
  box-sizing: border-box;
}

/* Main banner shell */
.ns-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  width: 100%;
  margin: 0;
  padding: 8px 12px;

  border: 1px solid #dee2e6;
  border-radius: 0;
  box-sizing: border-box;
  box-shadow: none;

  text-align: left;
  background: #ffffff;
}

.ns-top-stack {
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #0f172a;
}

/* Left side: icon + text */
.ns-top-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;

  flex: 1 1 auto;
  min-width: 0;
}

/* Icon block */
.ns-top-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}

.ns-top-banner-icon .material-icons {
  font-size: 18px;
  line-height: 1;
}

/* Text wrapper */
.ns-top-banner-text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

/* Title */
.ns-top-banner-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: inherit;
}

/* Message */
.ns-top-banner-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: inherit;
  opacity: 0.95;
  word-break: break-word;
}

.ns-top-banner-text strong {
  font-weight: 700;
}

/* Links */
.ns-top-banner-text a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ns-top-banner-text a:hover {
  opacity: 0.85;
}

/* Right side: actions */
.ns-top-banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;

  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

/* Buttons */
.ns-banner-btn {
  appearance: none;
  border-radius: 0;
  min-height: 30px;
  padding: 6px 10px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;

  cursor: pointer;
  box-shadow: none;
  background: transparent;

  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

/* Primary button */
.ns-banner-btn-primary {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
}

.ns-banner-btn-primary:hover {
  background: #000000;
  border-color: #000000;
}

/* Secondary button */
.ns-banner-btn-secondary {
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #212529;
}

.ns-banner-btn-secondary:hover {
  background: #e9ecef;
  border-color: #ced4da;
}

/* ==========================================================================
   Variants
   ========================================================================== */

/* Info */
.ns-top-banner-info {
  background: #eff6ff;
  color: #18406b;
}

.ns-top-banner-info .ns-top-banner-icon .material-icons {
  color: #2563eb;
}

/* Warning */
.ns-top-banner-warning {
  background: #fff7e6;
  color: #6b4f13;
}

.ns-top-banner-warning .ns-top-banner-icon .material-icons {
  color: #d97706;
}

/* Critical / error */
.ns-top-banner-critical {
  background: #fff1f1;
  color: #7a2323;
}

.ns-top-banner-critical .ns-top-banner-icon .material-icons {
  color: #dc2626;
}

/* Success */
.ns-top-banner-success {
  background: #edf8f1;
  color: #1f5a37;
}

.ns-top-banner-success .ns-top-banner-icon .material-icons {
  color: #16a34a;
}

/* Neutral */
.ns-top-banner-neutral {
  background: #f4f5f7;
  color: #374151;
}

.ns-top-banner-neutral .ns-top-banner-icon .material-icons {
  color: #6b7280;
}

/* ==========================================================================
   Compact mode
   ========================================================================== */
.ns-top-banner.ns-top-banner-compact {
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 10px;
}

.ns-top-banner.ns-top-banner-compact .ns-top-banner-title {
  font-size: 12px;
}

.ns-top-banner.ns-top-banner-compact .ns-top-banner-text {
  font-size: 12px;
  line-height: 1.35;
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 767px) {
  .ns-top-banner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .ns-top-banner-content {
    align-items: flex-start;
    gap: 8px;
  }

  .ns-top-banner-icon {
    align-self: flex-start;
  }

  .ns-top-banner-text-wrap {
    width: 100%;
  }

  .ns-top-banner-title {
    font-size: 13px;
  }

  .ns-top-banner-text {
    font-size: 12px;
    line-height: 1.45;
  }

  .ns-top-banner-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }

  .ns-banner-btn {
    font-size: 12px;
    padding: 7px 10px;
  }
}
