/* Mini User Guide stylesheet with Glassmorphism & Micro-animations */

.user-guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 110000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  padding: 20px;
}

.user-guide-overlay.active {
  opacity: 1;
  visibility: visible;
}

.user-guide-modal {
  width: 100%;
  max-width: 580px;
  background: var(--brokerly-card-background, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--brokerly-border-medium, rgba(255, 255, 255, 0.4));
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  position: relative;
}

.user-guide-overlay.active .user-guide-modal {
  transform: scale(1) translateY(0);
}

/* Dark mode overrides */
[data-theme="dark"] .user-guide-modal {
  background: rgba(28, 28, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.user-guide-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brokerly-text-secondary, #888);
  transition: all 0.2s ease;
  z-index: 10;
}

.user-guide-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--brokerly-text-primary, #000);
  transform: rotate(90deg);
}

[data-theme="dark"] .user-guide-close {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .user-guide-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-guide-header {
  padding: 24px 24px 12px;
  text-align: center;
}

.user-guide-logo-wrap {
  position: relative;
  display: block;
  width: 260px;
  height: 70px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.user-guide-logo-wrap .logo-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 44% !important;
}

.user-guide-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brokerly-text-primary, #1a1a1a);
  margin: 0;
}

/* Carousel/Slides */
.user-guide-carousel {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: block;
  width: 100%;
}

.user-guide-track {
  display: flex;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  height: 100%;
}

.user-guide-slide {
  flex-shrink: 0;
  padding: 0 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.user-guide-image-container {
  width: 100%;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--brokerly-border-medium, rgba(0, 0, 0, 0.08));
  position: relative;
  margin-bottom: 20px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

[data-theme="dark"] .user-guide-image-container {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.user-guide-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.6s ease;
}

.user-guide-slide:hover .user-guide-image {
  transform: scale(1.03);
}

.user-guide-info {
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}

.user-guide-step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brokerly-text-primary, #1a1a1a);
  margin: 0 0 10px 0;
}

.user-guide-step-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--brokerly-text-secondary, #666);
  margin: 0;
}

/* Footer / Navigation Control */
.user-guide-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--brokerly-border-subtle, rgba(0, 0, 0, 0.05));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="dark"] .user-guide-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-guide-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.user-guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brokerly-border-medium, #ddd);
  transition: all 0.3s ease;
  cursor: pointer;
}

.user-guide-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--brokerly-primary, #1A7FE6);
}

[data-theme="dark"] .user-guide-dot {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .user-guide-dot.active {
  background: var(--brokerly-primary, #1A7FE6);
}

.user-guide-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-guide-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid var(--brokerly-border-medium, #ddd);
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brokerly-text-primary, #333);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-guide-btn:hover {
  background: var(--brokerly-border-subtle, #f5f5f5);
  transform: translateY(-1px);
}

.user-guide-btn.primary {
  background: var(--brokerly-primary, #1A7FE6);
  border-color: var(--brokerly-primary, #1A7FE6);
  color: #fff;
}

.user-guide-btn.primary:hover {
  background: var(--brokerly-primary-dark, #0D4F8C);
  border-color: var(--brokerly-primary-dark, #0D4F8C);
  box-shadow: 0 4px 12px rgba(26, 127, 230, 0.25);
}

.user-guide-btn.secondary {
  border-color: transparent;
  color: var(--brokerly-text-secondary, #666);
}

.user-guide-btn.secondary:hover {
  background: transparent;
  color: var(--brokerly-text-primary, #111);
  text-decoration: underline;
}

.user-guide-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* Animations and Responsive adaptations */
@media (max-width: 580px) {
  .user-guide-modal {
    border-radius: 20px;
  }
  
  .user-guide-image-container {
    height: 180px;
  }
  
  .user-guide-title {
    font-size: 1.3rem;
  }
}

.user-guide-path {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--brokerly-primary, #1A7FE6);
  background: rgba(26, 127, 230, 0.05);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 500;
  border: 1px dashed rgba(26, 127, 230, 0.25);
  text-align: center;
}

[data-theme="dark"] .user-guide-path {
  background: rgba(26, 127, 230, 0.08);
  border: 1px dashed rgba(26, 127, 230, 0.35);
  color: #38bdf8;
}
