/* LBS Help Panel - Pannello laterale aiuto contestuale */

/* Overlay */
.lbs-help-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lbs-help-overlay.active {
  display: block;
  opacity: 1;
}

/* Pannello laterale */
.lbs-help-panel {
  display: none;
  position: fixed;
  top: 0;
  right: -460px;
  width: 450px;
  height: 100%;
  background: #fff;
  z-index: 9999;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  overflow: hidden;
}
.lbs-help-panel.active {
  display: block;
  right: 0;
}

/* Header pannello */
.lbs-help-panel-header {
  background: linear-gradient(135deg, #036, #069);
  color: #fff;
  padding: 0;
}
.lbs-help-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
}
.lbs-help-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.lbs-help-panel-header h3 i {
  margin-right: 8px;
}
.lbs-help-panel-close {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 3px;
}
.lbs-help-panel-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Barra navigazione dentro header blu */
.lbs-help-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 10px;
}
.lbs-help-nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 3px;
  transition: background 0.15s;
  white-space: nowrap;
}
.lbs-help-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
}
.lbs-help-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.lbs-help-nav-btn i {
  font-size: 11px;
}
.lbs-help-nav-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-left: auto;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Contenuto scrollabile */
.lbs-help-panel-body {
  padding: 20px;
  overflow-y: auto;
  height: calc(100% - 82px);
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

/* Loading */
.lbs-help-loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}
.lbs-help-loading i {
  font-size: 24px;
  color: #069;
  animation: lbs-help-spin 1s linear infinite;
  display: block;
  margin-bottom: 10px;
}
@keyframes lbs-help-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Stili contenuto help */
.lbs-help-panel-body h2 {
  font-size: 16px;
  color: #036;
  border-bottom: 2px solid #069;
  padding-bottom: 8px;
  margin: 20px 0 12px 0;
}
.lbs-help-panel-body h2:first-child {
  margin-top: 0;
}
.lbs-help-panel-body h3 {
  font-size: 14px;
  color: #333;
  margin: 15px 0 8px 0;
}
.lbs-help-panel-body h4 {
  font-size: 13px;
  color: #555;
  margin: 12px 0 6px 0;
}
.lbs-help-panel-body p {
  margin: 8px 0;
}
.lbs-help-panel-body ul,
.lbs-help-panel-body ol {
  margin: 8px 0;
  padding-left: 20px;
}
.lbs-help-panel-body li {
  margin-bottom: 4px;
}
.lbs-help-panel-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12px;
}
.lbs-help-panel-body table th {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6px 8px;
  text-align: left;
  font-weight: bold;
}
.lbs-help-panel-body table td {
  border: 1px solid #ddd;
  padding: 5px 8px;
}
.lbs-help-panel-body table tr:nth-child(even) {
  background: #fafafa;
}
.lbs-help-panel-body code {
  background: #f5f5f5;
  padding: 1px 5px;
  border: 1px solid #ddd;
  font-size: 12px;
  color: #c00;
}
.lbs-help-panel-body pre {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 10px;
  overflow-x: auto;
  font-size: 12px;
}

/* Alert box */
.lbs-help-alert {
  background: #fff3e0;
  border-left: 4px solid #f90;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 12px;
}
.lbs-help-alert i {
  color: #f90;
  margin-right: 6px;
}
.lbs-help-tip {
  background: #e3f2fd;
  border-left: 4px solid #069;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 12px;
}
.lbs-help-tip i {
  color: #069;
  margin-right: 6px;
}

/* Link interni nel pannello */
.lbs-help-panel-body a.lbs-help-link {
  color: #069;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.lbs-help-panel-body a.lbs-help-link:hover {
  text-decoration: underline;
}

/* Indice */
.lbs-help-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lbs-help-index-list li {
  margin-bottom: 2px;
}
.lbs-help-index-list a {
  display: block;
  padding: 8px 12px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s;
  cursor: pointer;
}
.lbs-help-index-list a:hover {
  background: #e3f2fd;
  border-color: #069;
  color: #036;
}
.lbs-help-index-list a i {
  margin-right: 8px;
  color: #069;
  width: 16px;
  text-align: center;
}

/* Footer pannello */
.lbs-help-panel-footer {
  border-top: 1px solid #ddd;
  padding: 10px 0;
  margin-top: 20px;
  text-align: center;
}
.lbs-help-panel-footer a {
  color: #069;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}
.lbs-help-panel-footer a:hover {
  text-decoration: underline;
}

/* Pulsante fisso (FAB) in basso a destra */
.lbs-help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  background: linear-gradient(135deg, #036, #069);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.lbs-help-fab:hover {
  background: linear-gradient(135deg, #024, #058);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.lbs-help-fab:active {
  transform: translateY(0);
}
.lbs-help-fab i {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 500px) {
  .lbs-help-panel {
    width: 100%;
    right: -100%;
  }
  .lbs-help-fab {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }
}
