/* 🏗️ Board & Flow Application Styles */

.flows-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flow-explanation {
  width: 100%;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}

.flow-explanation h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.flow-explanation p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.flow-embed {
  height: 550px;
  background: var(--bg-primary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 10px var(--shadow-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

:root {
    --header-height: 72px;
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
}

/* Fullsystem Interaction Overrides */
ui-board.full-window {
    position: fixed;
    width: 100% !important;
    height: calc(100% - var(--header-height)) !important;
    top: var(--header-height);
    left: 0;
    z-index: 9999;
    background: #111;
}

/* Disable AOS transforms when a board is maximized to prevent fixed positioning break */
body.showing-full-window [data-aos] {
    transform: none !important;
    perspective: none !important;
    filter: none !important;
    transition: none !important;
}

body.showing-board {
    overflow: hidden;
}

/* Fallback for Fullscreen button */
.flow-embed:fullscreen {
  background: white;
  padding: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .flows-container {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .flow-explanation {
        padding: 1.25rem 0.75rem;
        border-radius: 12px;
    }
    
    .flow-embed {
        height: 400px; /* Slightly shorter on mobile for better visibility of context */
    }
}

/* cinematic transitions for opening/closing flows */
.transition-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 500;
    pointer-events: none;
    background-color: #111;
}

.dive-out {
    animation: dive-out 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.rise-in {
    animation: rise-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dive-out {
    from { transform: scale(1); opacity: 1; filter: blur(0); }
    to { transform: scale(4); opacity: 0; filter: blur(15px); }
}

@keyframes rise-in {
    from { transform: scale(0.2); opacity: 0; filter: blur(15px); }
    to { transform: scale(1); opacity: 1; filter: blur(0); }
}

/* Reverse for closing */
.fall-out {
    animation: fall-out 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pull-in {
    animation: pull-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fall-out {
    from { transform: scale(1); opacity: 1; filter: blur(0); }
    to { transform: scale(0.2); opacity: 0; filter: blur(15px); }
}

@keyframes pull-in {
    from { transform: scale(4); opacity: 0; filter: blur(15px); }
    to { transform: scale(1); opacity: 1; filter: blur(0); }
}


