/* Help Video System Styles */

/* Help Icon Button */
.help-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #9ca3af; /* gray-400 */
  transition: color 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.help-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.help-icon-btn:hover {
  color: #2563eb; /* blue-600 */
}

.help-icon-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
  border-radius: 0.25rem;
}

/* Tooltip */
.help-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #111827; /* gray-900 */
  color: white;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 9999;
  min-width: 150px;
  max-width: 300px;
  word-wrap: break-word;
}

/* Show tooltip on hover (controlled by JS) */
.help-icon-btn:hover .help-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Tooltip Arrow */
.help-tooltip > div:last-child {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -0.25rem;
}

.help-tooltip > div:last-child > div {
  border-width: 0.25rem;
  border-style: solid;
  border-color: transparent;
  border-top-color: #111827; /* gray-900 */
}

/* Modal Overlay */
.help-video-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1rem;
}

.help-video-modal.show {
  display: flex;
}

/* Modal Content */
.help-video-modal-content {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 56rem; /* 4xl */
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Video Container */
#help-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background-color: #f3f4f6; /* gray-100 */
  border-radius: 0.5rem;
}

#help-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Close Button in Modal */
.help-video-modal-close {
  transition: color 0.2s ease-in-out;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .help-video-modal-content {
    margin: 0.5rem;
    max-height: 95vh;
  }
  
  .help-tooltip {
    max-width: 200px;
    font-size: 0.75rem;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

