/* FloatHelpWidget */
.help-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100001;
  font-family: 'Ubuntu', sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.help-widget--hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.help-widget__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0093e9;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.help-widget__btn:hover {
  opacity: 1;
  background: #177aac;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

.help-widget__btn--active {
  opacity: 1;
  background: #555;
}

.help-widget__btn--active:hover {
  background: #333;
}

.help-widget__btn-icon {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-family: 'Ubuntu', serif;
}

.help-widget__panel {
  position: absolute;
  bottom: 54px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.help-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0093e9;
  color: white;
}

.help-widget__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.help-widget__title i {
  margin-right: 6px;
}

.help-widget__close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.8;
}

.help-widget__close:hover {
  opacity: 1;
}

.help-widget__search {
  padding: 12px 12px 8px;
  border-bottom: 1px solid #eee;
}

.help-widget__context {
  padding: 10px 14px;
  background: #f0f9ff;
  border-bottom: 1px solid #e0f0fa;
}

.help-widget__context-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}

.help-widget__context-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0093e9;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.help-widget__context-link i {
  margin-right: 4px;
}

.help-widget__context-link:hover {
  text-decoration: underline;
}

.help-widget__results {
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
  padding: 4px 0;
}

.help-widget__loading {
  padding: 20px 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.help-widget__empty {
  padding: 20px 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.help-widget__result {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  cursor: pointer;
}

.help-widget__result:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: inherit;
}

.help-widget__result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.help-widget__result-title {
  font-size: 13px;
  font-weight: 600;
  color: #0093e9;
}

.help-widget__result-snippet {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

.help-widget__result-snippet mark {
  background: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
}

.help-widget__links {
  padding: 12px 14px;
  flex: 1;
  overflow-y: auto;
}

.help-widget__links-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.help-widget__sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.help-widget__section-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 12px;
  color: #444;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.help-widget__section-chip i {
  margin-right: 3px;
}

.help-widget__section-chip:hover {
  background: #e8f4fd;
  color: #0093e9;
  text-decoration: none;
}

/* Ticket section */
.help-widget__ticket-section {
  padding: 8px 14px;
  border-top: 1px solid #eee;
}

.help-widget__ticket-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: all 0.15s;
}

.help-widget__ticket-toggle i {
  margin-right: 4px;
}

.help-widget__ticket-toggle:hover {
  border-color: #0093e9;
  color: #0093e9;
}

.help-widget__ticket-form {
  margin-top: 8px;
}

.help-widget__ticket-form .form-group {
  margin-bottom: 8px;
}

/* Footer */
.help-widget__footer {
  padding: 10px 14px;
  border-top: 1px solid #eee;
  text-align: center;
}

.help-widget__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #0093e9;
  text-decoration: none;
}

.help-widget__footer-link i {
  margin-right: 3px;
}

.help-widget__footer-link:hover {
  text-decoration: underline;
}

/* Doc viewer */
.help-widget__doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.help-widget__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #0093e9;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.help-widget__back i {
  margin-right: 4px;
}

.help-widget__back:hover {
  background: #e8f4fd;
}

.help-widget__open-ext {
  display: inline-flex;
  align-items: center;
  color: #999;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.help-widget__open-ext:hover {
  color: #0093e9;
  text-decoration: none;
}

.help-widget__doc-frame {
  flex: 1;
  overflow: hidden;
}

.help-widget__iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* Responsive */
@media (max-width: 480px) {
  .help-widget__panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }
}
