/* =====================================================
   FisioLink – Onboarding Modal & Contextual Tooltips
   ===================================================== */

/* ---------- Overlay + Modal ---------- */
.fl-onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fl-fade-in 0.3s ease;
}

@keyframes fl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fl-onboarding-modal {
  background: linear-gradient(145deg, #1a1f35 0%, #0f1220 100%);
  border: 1px solid rgba(99, 179, 237, 0.2);
  border-radius: 24px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  width: min(92vw, 480px);
  overflow: hidden;
  animation: fl-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Full-screen on very small viewports (mobile) */
@media (max-width: 480px) {
  .fl-onboarding-modal {
    width: 100vw;
    min-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

@keyframes fl-slide-up {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ---------- Illustration area ---------- */
.fl-onb-illustration {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.fl-onb-illustration svg {
  width: 100%;
  height: 100%;
}

/* ---------- Content ---------- */
.fl-onb-content {
  padding: 28px 28px 24px;
}

.fl-onb-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #63b3ed;
  margin-bottom: 8px;
  opacity: 0.85;
}

.fl-onb-title {
  font-size: 22px;
  font-weight: 800;
  color: #f0f4ff;
  margin: 0 0 10px;
  line-height: 1.25;
}

.fl-onb-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #a0aec0;
  margin: 0 0 24px;
}

/* ---------- Progress dots ---------- */
.fl-onb-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.fl-onb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(99, 179, 237, 0.25);
  transition: background 0.3s, transform 0.3s, width 0.3s;
}

.fl-onb-dot.active {
  background: #63b3ed;
  width: 22px;
  border-radius: 4px;
  transform: none;
}

/* ---------- Actions ---------- */
.fl-onb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fl-onb-btn-skip {
  background: none;
  border: none;
  color: #718096;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fl-onb-btn-skip:hover { color: #a0aec0; }

.fl-onb-btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(49, 130, 206, 0.45);
}

.fl-onb-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 130, 206, 0.6);
}

.fl-onb-btn-next:active { transform: translateY(0); }

.fl-onb-btn-next .fl-arrow {
  font-size: 16px;
  transition: transform 0.2s;
}

.fl-onb-btn-next:hover .fl-arrow { transform: translateX(3px); }

/* ---------- Step transition ---------- */
.fl-onb-step-anim {
  animation: fl-step-in 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes fl-step-in {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* =====================================================
   Contextual Tooltips
   ===================================================== */

.fl-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.fl-tooltip-bubble {
  position: absolute;
  z-index: 8888;
  background: linear-gradient(135deg, #1a2744 0%, #162035 100%);
  border: 1px solid rgba(99, 179, 237, 0.35);
  border-radius: 14px;
  padding: 14px 16px 12px;
  width: clamp(200px, 80vw, 260px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: fl-tooltip-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  box-sizing: border-box;
}

/* Arrow element (class based instead of pseudo) */
.fl-tooltip-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #1a2744;
  border: 1px solid rgba(99, 179, 237, 0.35);
  transform: rotate(45deg);
  box-sizing: border-box;
}

/* Placement adjustments for arrow */
.fl-tooltip-bubble.bottom .fl-tooltip-arrow {
  top: -6px;
  border-bottom: none;
  border-right: none;
}

.fl-tooltip-bubble.top .fl-tooltip-arrow {
  bottom: -6px;
  border-top: none;
  border-left: none;
}

.fl-tooltip-bubble.right .fl-tooltip-arrow {
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  border-right: none;
  border-top: none;
}

.fl-tooltip-bubble.left .fl-tooltip-arrow {
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  border-left: none;
  border-bottom: none;
}

@keyframes fl-tooltip-pop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.fl-tooltip-text {
  font-size: 13px;
  line-height: 1.55;
  color: #cbd5e0;
  margin: 0 0 10px;
}

.fl-tooltip-close {
  display: flex;
  justify-content: flex-end;
}

.fl-tooltip-close-btn {
  background: rgba(99, 179, 237, 0.15);
  border: 1px solid rgba(99, 179, 237, 0.3);
  color: #63b3ed;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.fl-tooltip-close-btn:hover {
  background: rgba(99, 179, 237, 0.28);
  transform: scale(1.04);
}

/* Pulse highlight ring around targeted element */
.fl-tooltip-highlight {
  position: relative;
  z-index: 8887;
}

.fl-tooltip-highlight::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 2px solid rgba(99, 179, 237, 0.55);
  animation: fl-pulse-ring 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fl-pulse-ring {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%       { opacity: 0.2;  transform: scale(1.04); }
}

/* =====================================================
   "Ayuda" Guide Panel (accessible from Profile menu)
   ===================================================== */

.fl-help-guide-container {
  padding: 20px;
  max-width: 560px;
  margin: 0 auto;
}

.fl-help-guide-title {
  font-size: 20px;
  font-weight: 800;
  color: #f0f4ff;
  margin: 0 0 6px;
}

.fl-help-guide-subtitle {
  font-size: 13px;
  color: #ffffff;
  margin: 0 0 24px;
}

.fl-help-guide-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(99, 179, 237, 0.07);
  border: 1px solid rgba(99, 179, 237, 0.18);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.fl-help-guide-card:hover {
  background: rgba(99, 179, 237, 0.13);
  border-color: rgba(99, 179, 237, 0.35);
}

.fl-help-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.fl-help-card-body {
  flex: 1;
}

.fl-help-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 4px;
}

.fl-help-card-desc {
  font-size: 13px;
  color: #ffffff;
  margin: 0;
  line-height: 1.5;
}

.fl-help-replay-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(49, 130, 206, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fl-help-replay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 130, 206, 0.55);
}
