/* Stili avanzati per tooltip e aiuto contestuale */

/* Stili per il pulsante di aiuto globale */
.global-help-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #1a73e8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.global-help-button:hover {
  transform: scale(1.1);
  background-color: #0d62c9;
}

/* Stili per il pannello di aiuto globale */
.global-help-panel {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 350px;
  max-height: 500px;
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 999;
  overflow-y: auto;
  display: none;
  border-left: 4px solid #1a73e8;
  color: #fff;
}

.global-help-panel.active {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.global-help-panel h3 {
  margin-top: 0;
  color: #1a73e8;
  font-size: 18px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.global-help-panel p {
  line-height: 1.5;
  margin-bottom: 15px;
}

.global-help-panel ul {
  padding-left: 20px;
}

.global-help-panel li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.global-help-panel strong {
  color: #61dafb;
}

.close-help-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-help-button:hover {
  color: #fff;
}

/* Miglioramenti ai tooltip esistenti */
.tooltip .tooltip-text {
  width: 220px;
  line-height: 1.4;
  font-size: 13px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-left: 3px solid #1a73e8;
}

/* Tooltip per elementi di input */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  position: relative;
}

/* Tooltip per icone */
.icon-with-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.icon-with-tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.icon-with-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Tooltip per elementi di form */
.form-group {
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
}

.form-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #555;
  color: white;
  font-size: 12px;
  margin-left: 5px;
  cursor: help;
}

.form-help-icon:hover + .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Tooltip per pulsanti */
button {
  position: relative;
}

/* Tooltip per elementi di navigazione */
.breadcrumb {
  position: relative;
}

/* Animazione migliorata per tooltip */
.tooltip:hover .tooltip-text {
  animation: fadeInTooltip 0.3s ease-in-out;
}

@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}