/* Hide marks and dots for annotation range slider */
#annotation-range .rc-slider-mark,
#annotation-range .rc-slider-mark-text,
#annotation-range .rc-slider-step,
#annotation-range .rc-slider-dot {
  display: none !important;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* Custom Scrollbar Styling */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #795EB6;
    border-radius: 5px;
    border: 2px solid #1a1a2e;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B6FC7;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #795EB6 #1a1a2e;
}

/* 🌑 General Theme - Dark but with Earthy Undertones */
body {
    background-color: #1C1C1C; /* Deep Rock Grey */
    color: #B8B8B8; /* Soft Chalk White */
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* BoulderFlow Title - Full-width Header Panel */
.boulderflow-title-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 3px solid #795EB6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
}

.title-b {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #795EB6; /* Purple from profile radial plots */
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 72px; /* Larger than the 'f' */
}

.title-eta-breakers {
    font-family: "Rubik", sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    color: #20B2AA; /* Teal color */
    letter-spacing: 1px;
    font-size: 40px;
    vertical-align: middle;
}

.title-network {
    font-family: "Rubik", sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: italic;
    color: #F5F5DC; /* Off-white color */
    letter-spacing: 1px;
    font-size: 40px;
    vertical-align: middle;
}

.title-f {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: italic;
    font-weight: 600;
    color: #FFA800; /* Gold from profile radial plots */
    font-size: 72px; /* Much larger for the 'f' */
}


.title-low {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: italic;
    color: #FFA800; /* Gold from profile radial plots */
    font-weight: 600;
    font-size: 52px;
    /*text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);*/
    transform: translateY(-3px); /* Fine-tune vertical alignment */
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .boulderflow-title-header {
        padding: 20px;
        gap: 0px;
    }
    
    .title-boulder {
        font-size: 36px;
        letter-spacing: 0.5px;
    }
    
    .title-f {
        font-size: 54px;
    }
    
    .title-low {
        font-size: 40px;
    }
}

/* Keep the old sidebar title styling for backward compatibility */
.boulderflow-title {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    font-size: 22px;
    font-weight: 800;
}

/* 📊 Analytics Dashboard - Rough Texture, Industrial Look */
.analytics-dashboard {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    font-size: 46px;
    color: #76C297; /* Earthy Pastel Green */
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.5);
}

/* 🧗 Subtle Climbing Grip Texture for Headers */
.section-header {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #B8B8B8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.video-container {
    position: relative;
    max-width: 900px;
    margin: auto;
}

#video-player {
    width: 100%;
    display: block;
}

#marker-bar {
    position: absolute;
    height: 12px;
    z-index: 1000;
    pointer-events: none;
}

.marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: red;
    opacity: 0.9;
    pointer-events: auto;
    cursor: pointer;
}



#marker-bar {
    position: absolute;
    bottom: 0;
    height: 12px;
    z-index: 100;
    pointer-events: none;
    /* background debugging */
    background: linear-gradient(to right, red, blue);
    /* DO NOT set width/left/right here */
}


.marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1001;
    user-select: none;
    line-height: 1;
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;

}


.marker:hover {
    opacity: 1;
    background-color: orange;
}

*/
/* Exec line hover *//*

#exec-list-col span:hover { color: orange; }

*/
/* arm‑emoji list: light text, no background *//*

#exec-list-col span { color: #ddd; background: transparent; }


*/
/* 🌒 Sidebar Container *//*

#sidebar {
    background-color: #111; */
/* Dark matte *//*

    padding: 20px;
    color: white;
    min-height: 100vh;
    width: 220px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

*/
/* 🧭 Sidebar Links *//*

.sidebar-link {
    font-size: 18px;
    color: #ccc;
    text-decoration: none;
    padding: 8px 0;
    transition: all 0.2s ease-in-out;
    display: block;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    color: #F48FB1;
    border-left: 4px solid #F48FB1;
    background-color: #1f1f1f;
    padding-left: 8px;
    cursor: pointer;
}

*/
/* ✅ Active Link (if you want to add .active manually or with JS) *//*

.sidebar-link.active {
    color: #76C297;
    font-weight: bold;
    border-left: 4px solid #76C297;
    background-color: #202020;
    padding-left: 8px;
}


*/
/* Main content pane *//*

.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #1C1C1C;
    color: #ccc;
}


@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        min-height: auto;
    }

    .sidebar-link {
        flex: 1;
        text-align: center;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-link:hover {
        border-left: none;
        border-bottom: 2px solid #F48FB1;
    }

    */
/* 🌑 Main content area beside the sidebar *//*

.main-content {
    background-color: #1C1C1C;  */
/* Match body background *//*

    color: #B8B8B8;            */
/* Light text *//*

    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

}


*/
/* Default (desktop) *//*

.climb-layout {
  flex-direction: row;
}

*/
/* Mobile breakpoint *//*

@media (max-width: 768px) {
  .climb-layout {
    flex-direction: row;   */
/* keep side-by-side *//*

  }
  .climb-layout > div:nth-child(2) {
    flex: 0 0 60px;        */
/* shrink metrics column *//*

    max-width: 60px;
    font-size: 10px;       */
/* shrink text *//*

    overflow-x: hidden;
  }
}

*/
/* Video Layout System *//*

.climb-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding-top: 20px;
  flex-wrap: wrap;
}

.video-section {
  flex: 0 0 auto;
  min-width: 300px;
  padding-right: 10px;
}

.metrics-section {
  flex: 1 1 auto;
  min-width: 250px;
  color: white;
  padding-right: 20px;
}

.video-wrapper {
  position: relative;
  width: auto;
  height: auto;
  max-height: 80vh;
  overflow: hidden;
}

.video-element {
  width: auto;
  height: auto;
  max-height: 80vh;
  max-width: 100vw;
  display: block;
  object-fit: contain;
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

*/
/* Mobile responsive adjustments *//*

@media (max-width: 768px) {
  .climb-layout {
    flex-direction: column;
    gap: 20px;
  }

  .video-section {
    flex: 0 0 auto;
    min-width: auto;
    max-width: 100%;
  }

  .metrics-section {
    flex: 1 1 100%;
    min-width: auto;
    max-width: 100%;
  }

  .video-wrapper {
    max-height: 50vh;
  }

  .video-element {
    max-height: 50vh;
    max-width: 100vw;
  }
}

*/
/* Landscape orientation adjustments *//*

@media (orientation: landscape) and (max-height: 600px) {
  .video-wrapper {
    max-height: 80vh;
  }

  .video-element {
    max-height: 80vh;
  }
}


*/
/* === Page Container === *//*

.bf-root {
  box-sizing: border-box;   */
/* prevent padding/borders from breaking width *//*

  padding: 16px;            */
/* breathing room around content *//*

  background-color: #111;   */
/* dark background (adjust as needed) *//*

  min-height: 100vh;        */
/* full viewport height *//*

  overflow-x: hidden;       */
/* prevent horizontal scrollbars *//*

}

*/
/* === Main Row: video + sidebar === *//*

.bf-main-row {
  display: flex;            */
/* place video + sidebar side by side *//*

  gap: 20px;                */
/* space between the two columns *//*

  align-items: flex-start;  */
/* keep both columns top-aligned *//*

  padding-top: 16px;
  flex-wrap: nowrap;        */
/* keep side by side (mobile behavior later) *//*

}

*/
/* === Video Wrapper === *//*

.bf-video-wrapper {
  position: relative;       */
/* makes overlay position absolute inside here *//*

  display: inline-block;    */
/* shrink-wrap around video *//*

  width: fit-content;       */
/* match the video's rendered width *//*

  max-width: 100%;          */
/* never exceed parent column *//*

  max-height: 80vh;         */
/* cap at 80% of viewport height *//*

  overflow: hidden;         */
/* no scrollbars if rounding causes mismatch *//*

  align-self: flex-start;   */
/* stay aligned at the top of its column *//*

}

*/
/* === Video Element === *//*

.bf-video {
  display: block;        */
/* remove inline spacing quirks *//*

  width: auto;           */
/* let height drive scaling *//*

  height: auto;          */
/* let width drive scaling *//*

  max-width: 100%;       */
/* can’t overflow parent column *//*

  max-height: 80vh;      */
/* scale down if taller than viewport *//*

  object-fit: contain;   */
/* preserve aspect ratio, no cropping *//*

}

*/
/* === Pose Overlay === *//*

.bf-overlay {
  position: absolute;   */
/* sit on top of the video *//*

  top: 0;
  left: 0;
  right: 0;
  bottom: 0;            */
/* cover entire wrapper box *//*

  pointer-events: none; */
/* don’t block video controls *//*

  z-index: 2;           */
/* always above video *//*

}

*/
/* === Sidebar: metrics + executions === *//*

.bf-sidebar {
  flex: 0 1 350px;      */
/* sidebar can shrink, but not grow past 350px *//*

  max-width: 350px;     */
/* cap desktop width *//*

  color: white;         */
/* default text color *//*

  overflow-y: auto;     */
/* scroll if content taller than viewport *//*

  align-self: flex-start; */
/* align top with video *//*

}

*/
/* Title inside sidebar *//*

.bf-metrics-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

*/
/* Metrics content area *//*

.bf-metrics-content {
  margin-bottom: 20px;
}

*/
/* Execution list area *//*

.bf-exec-list {
  margin-top: 30px;
}

*/
/* === Page Container === *//*

.profile-root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #232337;
  color: #EEE;
  padding: 30px;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

*/
/* Title *//*

.profile-title {
  margin-bottom: 20px;
  font-size: 1.8em;
  text-align: left;
}

*/
/* === Top Summary Panel (dropdown/meta + two small plots) === *//*

.profile-summary-panel {
  display: flex;
  flex-direction: row;
  gap: 24px;                  */
/* space between left + right parts *//*

  align-items: flex-start;
  background: #28284a;
  border-radius: 16px;
  padding: 22px 32px;
  margin-bottom: 34px;
  width: 100%;
  min-height: 20%;
  box-shadow: 0 2px 8px #0003;
}

*/
/* === Main row container for radial + metrics === *//*

.profile-main-row {
  display: flex;
  flex-direction: row;   */
/* side by side on desktop *//*

  gap: 24px;
  width: 100%;
  min-height: 340px;
  align-items: flex-start;
}

*/
/* Radial plot sizing *//*

.profile-metrics-plot {
  width: 720px !important;
  height: 720px !important;
  flex: 0 0 auto;
  margin: 0 auto;
}

*/
/* Gauge metrics panel *//*

.profile-gauge-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

*/
/* --- Mobile breakpoint --- *//*

@media (max-width: 768px) {
  .profile-main-row {
    flex-direction: column;   */
/* stack plot + metrics *//*

    align-items: flex-start;   */
/* ✅ align left & top, no centering *//*

    gap: 8px;
  }

  .profile-metrics-plot {
    width: 360px !important;
    height: 360px !important;
  }

  .profile-gauge-panel {
    margin-top: 8px;
    width: 100%;
  }
}

*/
/* === Gauge panel container === *//*

.profile-gauge-panel-content {
  height: 100%;
  overflow-y: auto;
  background: #232337;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 2px 12px #0004;
  display: flex;
  flex-direction: column;
}

*/
/* Category headings *//*

.profile-gauge-panel-content > div:first-child {
  font-weight: bold;
  font-size: 1.1em;
  margin: 14px 0 4px 0;
}

*/
/* Metric row *//*

.profile-gauge-panel-content .metric-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-weight: bold;
  color: #EEE;
}

*/
/* Percentile bar background *//*

.profile-gauge-panel-content .metric-bar-bg {
  width: 100%;
  background: #393959;
  border-radius: 10px;
  height: 18px;
  margin-bottom: 16px;
}

*/
/* Percentile bar fill *//*

.profile-gauge-panel-content .metric-bar-fill {
  height: 18px;
  border-radius: 10px;
}

.metric-category {
  font-weight: 700;    */
/* force bold *//*

  font-size: 1.1em;
  margin: 14px 0 4px 0;
}


*/
/* --- Mobile overrides --- *//*

@media (max-width: 768px) {
  .profile-gauge-panel-content {
    padding: 12px;
  }

  .profile-gauge-panel-content > div:first-child {
    font-size: 0.9em;   */
/* smaller headings *//*

  }

  .profile-gauge-panel-content .metric-row {
    font-size: 0.8em;   */
/* shrink text *//*

  }

  .profile-gauge-panel-content .metric-bar-bg,
  .profile-gauge-panel-content .metric-bar-fill {
    height: 8px;       */
/* thinner bars on mobile *//*

    margin-bottom: 8px;
  }

  .profile-main-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;   */
/* smaller gap *//*

  }

  .profile-gauge-panel {
    margin-top: 0;   */
/* remove the extra margin *//*

    width: 100%;
  }

}


.metric-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-weight: bold;
}

.metric-label {
  flex: 1;   */
/* takes up all available space *//*

}

.metric-value {
  text-align: right;   */
/* force right align *//*

  min-width: 40px;     */
/* ensures space for numbers *//*

}
*/

/* Main content pane */
.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #1C1C1C;
    color: #ccc;
}

@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        min-height: auto;
    }

    .sidebar-link {
        flex: 1;
        text-align: center;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-link:hover {
        border-left: none;
        border-bottom: 2px solid #F48FB1;
    }

    .main-content {
        background-color: #1C1C1C;
        color: #B8B8B8;
        padding: 30px;
        flex-grow: 1;
        overflow-y: auto;
    }
}

/* Default (desktop) */
.climb-layout { flex-direction: row; }

/* Mobile climb view adjustments */
@media (max-width: 768px) {
  .climb-layout { flex-direction: row; }
  .climb-layout > div:nth-child(2) {
    flex: 0 0 60px;
    max-width: 60px;
    font-size: 10px;
    overflow-x: hidden;
  }
}

/* Video Layout System */
.climb-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding-top: 20px;
  flex-wrap: wrap;
}
.video-section { flex: 0 0 auto; min-width: 300px; padding-right: 10px; }
.metrics-section { flex: 1 1 auto; min-width: 250px; color: white; padding-right: 20px; }
.video-wrapper { position: relative; width: auto; height: auto; max-height: 80vh; overflow: hidden; }
.video-element { width: auto; height: auto; max-height: 80vh; max-width: 100vw; display: block; object-fit: contain; }
.overlay-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

@media (max-width: 768px) {
  .climb-layout { flex-direction: column; gap: 20px; }
  .video-section { flex: 0 0 auto; max-width: 100%; }
  .metrics-section { flex: 1 1 100%; max-width: 100%; }
  .video-wrapper { max-height: 50vh; }
  .video-element { max-height: 50vh; max-width: 100vw; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .video-wrapper { max-height: 80vh; }
  .video-element { max-height: 80vh; }
}

/* === Climb view (new system) === */
.bf-root {
  box-sizing: border-box;
  padding: 16px;
  background-color: #111;
  min-height: 100vh;
  overflow-x: hidden;
}
.bf-main-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-top: 16px;
  flex-wrap: nowrap;
}
.bf-video-wrapper {
  position: relative;
  display: block;  /* Changed from inline-block to prevent subpixel oscillation */
  width: 100%;  /* Changed from fit-content - stable layout */
  max-width: 100%;
  max-height: 80vh;
  overflow: hidden;
  align-self: flex-start;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Pose overlay container fills wrapper using CSS only - prevents feedback loop */
#pose-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}
.bf-video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.bf-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none !important;  /* Always none - never flip to auto */
  z-index: 2;
  /* Use clip-path to exclude bottom 50px where video controls are */
  clip-path: inset(0 0 50px 0);
}
.bf-sidebar {
  flex: 0 1 350px;
  max-width: 350px;
  color: white;
  overflow-y: auto;
  align-self: flex-start;
}
/* Metrics Section */
.bf-metrics-section {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bf-metrics-content { 
  margin: 0;
  padding: 0;
}

/* Exec Section */
.bf-exec-section {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bf-exec-list { 
  margin: 0;
  padding: 0;
}

/* Radial Column */
.bf-radial-column {
  flex: 1; /* Expand to fill available space */
  min-width: 300px;
  max-width: 500px;
  color: white;
  overflow-y: auto;
  align-self: flex-start;
}

/* Radial Section */
.bf-radial-section {
  padding: 16px 20px;
  background: #232337;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bf-radial-plot {
  width: 100%;
  height: 500px;
}

/* === Profile page === */
.profile-root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #232337;
  color: #EEE;
  padding: 30px;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.profile-title { margin-bottom: 20px; font-size: 1.8em; text-align: left; }

.profile-summary-panel {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  background: #28284a;
  border-radius: 16px;
  padding: 22px 32px;
  margin-bottom: 34px;
  width: 100%;
  min-height: 20%;
  box-shadow: 0 2px 8px #0003;
}

/* Main row: radial + metrics */
.profile-main-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  min-height: 340px;
  align-items: flex-start;
}
.profile-metrics-plot {
  width: 720px !important;
  height: 720px !important;
  flex: 0 0 auto;
  margin: 0 auto;
}
.profile-gauge-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- Mobile breakpoint --- */
@media (max-width: 768px) {
  .profile-main-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;              /* tighter vertical gap */
  }
  .profile-metrics-plot {
    width: 340px !important;
    height: 340px !important;
    margin: 0 auto 4px auto;  /* shrink + less bottom margin */
  }
  .profile-gauge-panel {
    margin-top: 0;
    width: 100%;
  }
  .profile-gauge-panel-content {
    padding: 12px;
  }
  .metric-category { font-size: 0.9em; }
  .metric-row { font-size: 0.8em; }
  .metric-bar-bg, .metric-bar-fill {
    height: 8px;
    margin-bottom: 8px;
  }
}

/* Gauge panel box */
.profile-gauge-panel-content {
  height: 100%;
  overflow-y: auto;
  background: #232337;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 2px 12px #0004;
  display: flex;
  flex-direction: column;
}

/* Categories + metrics */
.metric-category {
  font-weight: 700;
  font-size: 1.1em;
  margin: 14px 0 4px 0;
}
.metric-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-weight: bold;
}
.metric-label { flex: 1; }
.metric-value {
  text-align: right;
  min-width: 40px;
}
.metric-bar-bg {
  width: 100%;
  background: #393959;
  border-radius: 10px;
  height: 18px;
  margin-bottom: 16px;
}
.metric-bar-fill {
  height: 18px;
  border-radius: 10px;
}

/* Video Selection Controls */
.bf-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Section Titles */
.bf-section-title {
  font-weight: 600;
  font-size: 14px;
  color: #e6e9f0;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Overlay Controls Section */
.bf-overlay-section {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bf-checklist {
  margin: 0;
  padding: 0;
}

.bf-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.bf-sublabel {
  font-size: 14px;
  font-weight: 600;
  color: #e6e9f0;
  margin: 0;
}

.bf-dropdown {
  min-width: 150px;
}

/* Dropdown option styling - darker text when selected */
.Select-control {
  background-color: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: #e6e9f0 !important;
}

.Select-menu-outer {
  background-color: #2a2a2a !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.Select-option {
  background-color: transparent !important;
  color: #e6e9f0 !important;
  padding: 8px 12px !important;
}

.Select-option:hover {
  background-color: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.Select-option.is-selected {
  background-color: rgba(244, 143, 177, 0.3) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.Select-option.is-focused {
  background-color: rgba(255,255,255,0.15) !important;
  color: #ffffff !important;
}

.Select-placeholder {
  color: #888 !important;
}

.Select-input {
  color: #e6e9f0 !important;
}

.Select-value-label {
  color: #e6e9f0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bf-controls {
    flex-direction: column;
    gap: 15px;
  }
  
  .bf-dropdown-group {
    min-width: 100%;
  }
}

/* App Shell Layout */
#app-shell {
    overflow: hidden !important;
    flex: 1 !important;
    min-height: 0 !important;
}

/* Sidebar Styling */
#sidebar {
    min-width: 0 !important;
    transition: width 0.2s ease !important;
}

/* Sidebar Toggle Button */
#sidebar-toggle {
    z-index: 1001 !important;
    right: -30px !important;
}

/* Main Content Area */
#main-content {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Routed Page Content */
#routed-page {
    flex: 1 !important;
    overflow: auto !important;
    min-height: 0 !important;
}

/* Sidebar States - Exactly 2 states */
#sidebar {
    width: 200px !important; /* Default expanded state */
    padding: 10px !important;
}

#sidebar.collapsed {
    width: 60px !important; /* Collapsed state - thin bar with icons */
    padding: 10px 5px !important; /* Reduced padding for narrow width */
}

/* Hide text labels when collapsed */
#sidebar.collapsed .sidebar-text {
    display: none !important;
}

/* Show emojis when collapsed */
#sidebar.collapsed .sidebar-emoji {
    font-size: 20px !important;
    text-align: center !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar-toggle {
        right: -25px !important; /* Adjust button position for mobile */
    }
}

/* === App Shell Layout === */
.app-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    background: #0a0a12;
    color: #EEE;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* Prevent children from forcing app-shell taller */
.app-shell,
.sidebar,
.main-content,
.routed-page {
  min-height: 0;   /* critical in flexbox to allow shrinking */
}


/* === Sidebar === */
.sidebar {
    width: 250px;
    background: #111;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    transition: width 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 0;
    max-height: 100%;
}
.sidebar.collapsed {
    width: 60px;
    padding: 10px 5px;
}
.sidebar.collapsed .sidebar-text { display: none; }
.sidebar.collapsed .sidebar-emoji { font-size: 20px; text-align: center; }

.sidebar-toggle {
    position: absolute;
    top: 10px;
    right: -24px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #F48FB1;
    color: #0a0a12;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    user-select: none;
    font-weight: 700;
    z-index: 1001;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 40px; /* push below toggle */
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #EEE;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: transparent;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
}
.sidebar-link.active {
    background: rgba(255,255,255,0.08);
    color: #76C297;
}

.sidebar-logout {
    margin: 8px 6px;
    padding: 8px 12px;
    background: transparent;
    color: #EEE;
    border: 1px solid #F48FB1;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.sidebar-spacer { 
    display: none; /* Remove spacer - nav-links will handle scrolling */
}

/* === Main Content Area === */
.main-content {
    flex: 1;
    min-height: 0;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.routed-page {
    flex: 1;
    overflow: auto;
    min-height: 0; /* allow shrinking in flex */
}

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        min-height: auto;
    }
    .sidebar-toggle {
        right: -25px;
    }
    .main-content {
        padding: 12px;
    }
}

/* =========================
   GLOBAL + HEIGHT CONTRACT
   ========================= */

/* Eliminate default body scrollbars and margins */
html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;         /* page itself never scrolls */
  background: #0a0a12;
  display: flex;
  flex-direction: column;
}
*, *::before, *::after { box-sizing: border-box; }

/* Header height token (keeps math consistent) */
:root { --header-h: 80px; }

/* Header occupies fixed height equal to --header-h */
.boulderflow-title-header {
  height: var(--header-h);
  flex: 0 0 var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
  /* (optional visual styles for your header can go here) */
}

/* App shell fills the rest of the viewport under the header */
.app-shell {
  display: flex;
  height: calc(100vh - var(--header-h));
  min-height: 0;           /* allow flex children to shrink */
  overflow: hidden;        /* internal panes manage their own scroll */
  background: #0a0a12;
  color: #EEE;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Critical: prevent any child from forcing extra page height */
.app-shell,
.sidebar,
.main-content,
.routed-page {
  min-height: 0;           /* flexbox shrink fix */
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
  width: 250px;
  background: #111;
  display: flex;
  flex-direction: column;
  padding: 10px;
  position: relative;
  transition: width 0.2s ease;
  overflow-y: auto;        /* sidebar scrolls if it needs to */
  overflow-x: hidden;
}
.sidebar.collapsed { width: 60px; padding: 10px 5px; }
.sidebar.collapsed .sidebar-text { display: none; }
.sidebar.collapsed .sidebar-emoji { font-size: 20px; text-align: center; }

.sidebar-toggle {
  position: absolute;
  top: 10px;
  right: -24px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #F48FB1;
  color: #0a0a12;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  user-select: none;
  font-weight: 700;
  z-index: 1001;
}

.nav-links { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; }
/* Removed duplicate sidebar-link definition - using the one at line 1354 */

.sidebar-logout {
  margin: 8px 6px;
  padding: 8px 12px;
  background: transparent;
  color: #EEE;
  border: 1px solid #F48FB1;
  border-radius: 6px;
  cursor: pointer;
}
.sidebar-spacer { flex: 1 1 auto; }

/* =========================
   MAIN CONTENT (SCROLL HOST)
   ========================= */
.main-content {
  flex: 1 1 auto;
  padding: 0px;
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* only .routed-page scrolls */
  min-width: 0;            /* prevent overflow in flex rows */
  box-sizing: border-box;
}
.routed-page {
  flex: 1 1 auto;
  overflow: auto;          /* the ONLY vertical scroll container */
  min-height: 0;           /* allow shrink within app-shell height */
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;      /* horizontal scroll if needed */
    overflow-y: hidden;
    min-height: auto;
  }
  .sidebar-toggle { right: -25px; }
  .main-content { padding: 12px; }
}

/* =========================
   PAGE ROOTS INSIDE ROUTER
   (override any old 100vh rules)
   ========================= */
.bf-root,
.profile-root {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  /* keep your own paddings/backgrounds as needed */
}

/* =========================
   EXECUTION LIST HOVER EFFECTS
   ========================= */
/* Hover effect for execution list items */
[data-type="exec-item"]:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Smooth transition for hover effects */
[data-type="exec-item"] {
  transition: all 0.2s ease !important;
}

/* =========================
   MOTION TRACE OVERLAY
   ========================= */

/* Motion trace circles with glow effect */
.motion-trace-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.1s ease;
}

/* Motion trace lines */
.motion-trace-line {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.1s ease;
}

/* =========================
   NOTES SECTION STYLING
   ========================= */

/* Notes Column */
.bf-notes-column {
  flex: 0 1 300px;
  max-width: 300px;
  color: white;
  overflow-y: auto;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Trainer Notes Section */
.bf-trainer-notes-section {
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
}

.bf-trainer-notes-text {
  color: #e6e9f0;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.bf-notes-placeholder {
  color: #888;
  font-style: italic;
  font-size: 14px;
  margin: 0;
  padding: 0;
}

/* User Notes Section */
.bf-user-notes-section {
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Notes Header */
.bf-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Edit Notes Button */
.bf-edit-notes-btn {
  padding: 4px 12px;
  background: rgba(244, 143, 177, 0.2);
  color: #F48FB1;
  border: 1px solid #F48FB1;
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.bf-edit-notes-btn:hover {
  background: rgba(244, 143, 177, 0.3);
  transform: translateY(-1px);
}

/* Cancel Notes Button */
.bf-cancel-notes-btn {
  padding: 4px 12px;
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.bf-cancel-notes-btn:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: translateY(-1px);
}

.bf-user-notes-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Notes Display (Read-only) */
.bf-notes-display {
  flex: 1 1 auto;
  min-height: 120px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow-y: auto;
}

.bf-user-notes-text {
  color: #e6e9f0;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
}

/* User Notes Edit Section */
.bf-user-notes-edit {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Notes Textarea */
.bf-notes-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #e6e9f0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}

.bf-notes-textarea:focus {
  outline: none;
  border-color: #F48FB1;
  box-shadow: 0 0 0 2px rgba(244, 143, 177, 0.2);
}

.bf-notes-textarea::placeholder {
  color: #888;
  font-style: italic;
}

/* Notes Actions */
.bf-notes-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.bf-save-notes-btn {
  padding: 8px 16px;
  background: #F48FB1;
  color: #0a0a12;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.bf-save-notes-btn:hover {
  background: #e67e9a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 143, 177, 0.3);
}

.bf-save-notes-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(244, 143, 177, 0.3);
}

.bf-notes-status {
  font-size: 12px;
  font-weight: 500;
  flex: 1 1 auto;
}

/* Responsive adjustments for notes */
@media (max-width: 1200px) {
  .bf-notes-column {
    flex: 0 1 250px;
    max-width: 250px;
  }
}

@media (max-width: 768px) {
  .bf-main-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .bf-notes-column {
    flex: 0 0 auto;
    max-width: 100%;
    order: 3; /* Move notes to bottom on mobile */
  }
  
  .bf-notes-textarea {
    min-height: 100px;
  }
}


/* Hold Usage Page Styles */
.bf-hold-metrics-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.hold-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.hold-metric-column {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #444;
}

.hold-metric-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.hold-type-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #444;
}

.hold-type-image {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hold-type-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.limb-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.limb-metric:last-child {
    border-bottom: none;
}

.limb-label {
    font-size: 14px;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bf-hold-summary-content {
    padding: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.summary-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #444;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.summary-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bf-placeholder {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
}

/* Responsive design for hold metrics */
@media (max-width: 768px) {
    .hold-metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .hold-metric-column {
        padding: 15px;
    }
    
    .hold-type-image {
        width: 50px;
        height: 50px;
    }
}

.sidebar-icon {
    border-radius: 4px;
    filter: brightness(0.8);
    transition: filter 0.2s ease;
}

.sidebar-icon:hover {
    filter: brightness(1.2);
}

/* Expandable Metric Sections */
.metric-sections-container {
    margin-top: 15px;
}

.metric-section {
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.metric-header {
    background-color: #444;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.metric-header:hover {
    background-color: #555;
}

.metric-header-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #E0E0E0;
}

.metric-expand-icon {
    font-size: 0.8em;
    color: #A0A0A0;
    transition: transform 0.2s ease;
}

.metric-content {
    background-color: #333;
    padding: 15px;
}

.limb-subsection {
    margin-bottom: 15px;
}

.limb-subsection:last-child {
    margin-bottom: 0;
}

.limb-subsection-label {
    font-size: 0.8em;
    font-weight: bold;
    color: #B0B0B0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limb-sides-container {
    display: flex;
    gap: 15px;
}

.limb-side-metric {
    flex: 1;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.limb-side-label {
    font-size: 0.75em;
    color: #A0A0A0;
    margin-bottom: 5px;
    text-align: center;
}

.metric-value-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.metric-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #E0E0E0;
}

.metric-arrow {
    font-size: 1.2em;
    font-weight: bold;
}

/* Arrow color coding */
.metric-arrow:contains("↗️") {
    color: #4CAF50; /* Green for higher values */
}

.metric-arrow:contains("↘️") {
    color: #F44336; /* Red for lower values */
}

.metric-arrow:contains("↔️") {
    color: #FFC107; /* Yellow for equal values */
}

/* Responsive adjustments for expandable sections */
@media (max-width: 768px) {
    .limb-sides-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .metric-content {
        padding: 10px;
    }
    
    .limb-side-metric {
        padding: 8px;
    }
}


/* Main Metrics Display (Always Visible) */
.metric-main-header {
    background-color: #444;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-main-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #E0E0E0;
    margin-bottom: 8px;
}

.main-metrics-container {
    display: flex;
    gap: 20px;
    flex: 1;
}

.limb-main-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.limb-main-label {
    font-size: 0.8em;
    color: #A0A0A0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-main-value {
    font-size: 1.3em;
    font-weight: bold;
    /* Color set dynamically by callback */
}

.metric-expand-button {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #555;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}

.metric-expand-button:hover {
    background-color: #666;
}

.metric-expand-icon {
    font-size: 0.8em;
    color: #A0A0A0;
    transition: transform 0.2s ease;
}

/* Responsive adjustments for main metrics */
@media (max-width: 768px) {
    .main-metrics-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .metric-main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .metric-expand-button {
        align-self: center;
    }
}


/* Updated Main Metrics Display - No Grey Box */
.metric-main-header {
    background-color: transparent;
    padding: 8px 0;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.metric-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-main-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #E0E0E0;
    margin-bottom: 4px;
}

.main-metrics-container {
    display: flex;
    gap: 20px;
}

.limb-main-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.limb-main-label {
    font-size: 0.8em;
    color: #A0A0A0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-main-value {
    font-size: 1.3em;
    font-weight: bold;
    /* Color set dynamically by callback */
}

.metric-expand-button {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    background-color: #444;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    margin-left: 10px;
}

.metric-expand-button:hover {
    background-color: #555;
}

.metric-expand-icon {
    font-size: 0.9em;
    color: #A0A0A0;
    transition: transform 0.2s ease;
}

/* Remove the grey box from metric sections */
.metric-section {
    margin-bottom: 10px;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Responsive adjustments for main metrics */
@media (max-width: 768px) {
    .main-metrics-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .metric-main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .metric-expand-button {
        align-self: center;
        margin-left: 0;
    }
}


/* Profile Tab Structure */
.profile-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
}

.profile-tabs-container {
    margin-bottom: 20px;
}

.profile-tab {
    background-color: #333;
    color: #A0A0A0;
    border: 1px solid #555;
    border-radius: 6px 6px 0 0;
    padding: 12px 24px;
    margin-right: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-tab--selected {
    background-color: #444;
    color: #E0E0E0;
    border-bottom: 1px solid #444;
}

.profile-tab:hover {
    background-color: #3a3a3a;
    color: #C0C0C0;
}

.profile-tab-content {
    background-color: #2a2a2a;
    border-radius: 0 8px 8px 8px;
    padding: 20px;
    min-height: 400px;
}

.profile-subtitle {
    color: #E0E0E0;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.hold-usage-content {
    background-color: transparent;
    padding: 0;
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .profile-tab {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .profile-tab-content {
        padding: 15px;
    }
}


/* Sidebar Sub-link Styling */
.sidebar-sub-link {
.sidebar-sub-link {
    margin-left: 24px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: transparent;
}

.sidebar-sub-link:hover {
    background: rgba(255,255,255,0.05);
}

.sidebar-sub-link.active {
    background: rgba(255,255,255,0.08);
    color: #76C297;
}

.sidebar-sub-link .sidebar-text {
    font-size: 0.95em;
}


/* Hold Usage Page - Single Column Layout */
.bf-main-content {
    margin-top: 20px;
}


/* Simplified metric display without expandable sections */
.hold-metric-column {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #444;
    margin-bottom: 15px;
}

.hold-type-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
}

.hold-type-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.metric-display {
    margin-bottom: 20px;
}

.metric-label {
    color: #ccc;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.limb-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background-color: #333;
    border-radius: 4px;
    border: 1px solid #555;
}

.limb-side {
    display: flex;
    align-items: center;
    gap: 5px;
}

.limb-side-label {
    color: #ccc;
    font-size: 11px;
    font-weight: 500;
}

.limb-side-value {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.metric-arrow {
    font-size: 14px;
    font-weight: bold;
}

.arrow-up {
    color: #28a745;
}

.arrow-down {
    color: #dc3545;
}

.arrow-equal {
    color: #ffc107;
}


/* Inline Metric Display */
.metric-display-inline {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #333;
    border-radius: 6px;
    border: 1px solid #555;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metric-header .metric-label {
    color: #ccc;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-header .metric-value {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.metric-split-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.metric-split-inline .limb-side-label {
    color: #999;
    font-weight: 500;
}

.metric-split-inline .limb-side-value {
    color: #fff;
    font-weight: 600;
}

.metric-split-inline .metric-arrow {
    font-size: 14px;
    font-weight: bold;
    margin: 0 4px;
}

.arrow-up {
    color: #28a745;
}

.arrow-down {
    color: #dc3545;
}

.arrow-equal {
    color: #ffc107;
}


/* ==========================================
   Annotation System Styles
   ========================================== */

/* Annotation Section Container */
.bf-annotations-section {
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #444;
}

/* Annotation Header */
.bf-annotation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Annotation Toggle Button */
.bf-annotation-toggle {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bf-annotation-toggle:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.bf-annotation-toggle:active {
    transform: translateY(0);
}

/* Annotation Status */
.bf-annotation-status {
    padding: 5px 12px;
    background-color: #555;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #ccc;
}

/* Annotation Tools Panel */
.bf-annotation-panel {
    margin-top: 15px;
    padding: 15px;
    background-color: #333;
    border-radius: 5px;
    border: 1px solid #555;
}

/* Annotation Tools Radio Items */
.bf-annotation-tools {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.bf-annotation-tools label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 12px;
    background-color: #444;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.bf-annotation-tools label:hover {
    background-color: #555;
}

.bf-annotation-tools input[type="radio"] {
    cursor: pointer;
}

.bf-annotation-tools input[type="radio"]:checked + label {
    background-color: #3498db;
    color: white;
}

/* Frame Range Section */
.bf-frame-range-section {
    margin: 15px 0;
}

.bf-frame-range-slider {
    width: 100%;
    margin-top: 10px;
}

.bf-frame-range-slider .rc-slider-track {
    background-color: #3498db;
}

.bf-frame-range-slider .rc-slider-handle {
    border-color: #3498db;
    background-color: #3498db;
}

/* Color Picker Section */
.bf-color-picker-section {
    margin: 15px 0;
}

/* Annotation Note Input */
.bf-annotation-note-section {
    margin: 15px 0;
}

.bf-annotation-note-input {
    width: 100%;
    padding: 8px 12px;
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #e6e9f0;
    font-size: 14px;
}

.bf-annotation-note-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Annotation Actions */
.bf-annotation-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.bf-save-annotation-btn {
    flex: 1;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bf-save-annotation-btn:hover {
    background-color: #229954;
    transform: translateY(-2px);
}

.bf-cancel-annotation-btn {
    flex: 1;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bf-cancel-annotation-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Annotations List Section */
.bf-annotations-list-section {
    margin-top: 20px;
}

.bf-annotations-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
}

/* Custom scrollbar for annotations list (uses global scrollbar colors) */
.bf-annotations-list::-webkit-scrollbar {
    width: 10px;
}

.bf-annotations-list::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 5px;
}

.bf-annotations-list::-webkit-scrollbar-thumb {
    background: #795EB6;
    border-radius: 5px;
    border: 2px solid #1a1a2e;
}

.bf-annotations-list::-webkit-scrollbar-thumb:hover {
    background: #8B6FC7;
}

/* Annotation List Item */
.anno-item {
    padding: 12px;
    background-color: #444;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.anno-item:hover {
    background-color: #4a4a4a;
    transform: translateX(2px);
}

.anno-item.anno-active {
    background-color: #4a4a4a;
    border-left-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

/* Edit mode: yellow border */
.anno-item.anno-editing {
    border: 3px solid #F1C40F !important;  /* Yellow border for edit mode */
    border-left: 3px solid #F1C40F !important;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
}

/* Save flash: blue border animation */
.anno-item.anno-saved {
    border: 3px solid #3498db !important;  /* Blue border flash on save */
    border-left: 3px solid #3498db !important;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
    animation: saveFlash 0.5s ease-out;
}

@keyframes saveFlash {
    0% {
        border-color: #3498db;
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
    }
    100% {
        border-color: #F1C40F;  /* Return to yellow edit mode */
        box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
    }
}

/* Annotation Item Header */
.anno-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.anno-type {
    font-weight: bold;
    font-size: 14px;
    color: #e6e9f0;
    text-transform: capitalize;
}

.anno-frames {
    font-size: 12px;
    color: #aaa;
    background-color: #555;
    padding: 2px 8px;
    border-radius: 3px;
}

.anno-color-indicator {
    font-size: 20px;
    margin-left: auto;
}

/* Annotation Note */
.anno-note {
    font-size: 13px;
    color: #ccc;
    margin: 5px 0;
    font-style: italic;
}

/* Annotation Delete Button */
.anno-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    transition: opacity 0.3s;
    padding: 4px;
}

.anno-delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Video Wrapper Annotation Mode */
.video-wrapper-annotation-mode {
    cursor: crosshair !important;
}

#video-wrapper.video-wrapper-annotation-mode,
#projects-video-wrapper.video-wrapper-annotation-mode {
    cursor: crosshair !important;
}

/* Temporary Annotation Preview Elements */
.temp-annotation-element {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
}

.temp-annotation-line {
    background-color: rgba(255, 87, 51, 0.6);
    pointer-events: none;
    z-index: 9999;
}

/* SVG Annotation Styles */
.annotation-arrow,
.annotation-line,
.annotation-circle,
.annotation-text {
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Annotation Creator Badge */
.anno-creator-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.anno-creator-badge.trainer {
    background-color: #9b59b6;
    color: white;
}

.anno-creator-badge.user {
    background-color: #3498db;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .bf-annotation-tools {
        flex-direction: column;
    }
    
    .bf-annotations-list {
        max-height: 200px;
    }
}


/* Time Range Display */
.bf-time-range-display {
    margin-top: 8px;
    padding: 5px 10px;
    background-color: #444;
    border-radius: 4px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

.bf-time-range-slider {
    width: 100%;
    margin-top: 10px;
}


/* Duration Controls */
.bf-duration-section {
    margin: 15px 0;
}

.duration-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.duration-btn {
    width: 32px;
    height: 32px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duration-btn:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.duration-btn:active {
    transform: scale(0.95);
}

.bf-duration-input {
    flex: 1;
    padding: 8px 12px;
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #e6e9f0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.bf-duration-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.bf-duration-info {
    margin-top: 8px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

.duration-value {
    color: #3498db;
    font-weight: 600;
}


/* Coordinate Controls */
.bf-coords-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 5px;
}

.coords-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.coord-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coord-input {
    padding: 6px 8px;
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #e6e9f0;
    font-size: 14px;
    text-align: center;
}

.coord-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.bf-quick-annotate-section {
    margin: 15px 0;
}

.bf-quick-annotate-btn {
    width: 100%;
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bf-quick-annotate-btn:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}


/* Annotation Mode Visual Indicators */
.annotation-mode-active .bf-overlay {
    border: 3px dashed #3498db;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.annotation-mode-active {
    position: relative;
}

.annotation-mode-active::after {
    content: "🎨 DRAWING MODE - Click & Drag on Overlay";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    white-space: nowrap;
}

.bf-drawing-info {
    margin: 10px 0;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 5px;
}

.bf-drawing-instruction {
    font-size: 13px;
    color: #3498db;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.bf-drawing-status {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    font-style: italic;
}

/* ------------------------------
   Annotation Capture Layer (for drawing)
   ------------------------------ */
#annotation-wrapper,
#projects-annotation-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;  /* Default: disabled, enabled only in annotation mode */
    z-index: 3;  /* Above video (z:1) and pose overlay (z:2), below annotations (z:5) */
    cursor: crosshair;
    background: transparent;  /* Ensure it doesn't block visibility */
    /* Use clip-path to exclude bottom 50px where video controls are */
    clip-path: inset(0 0 50px 0);
}

#annotation-wrapper.annotation-mode-active,
#projects-annotation-wrapper.annotation-mode-active {
    pointer-events: auto;
    background: transparent;  /* Still transparent even when active */
}

/* ------------------------------
   Annotation Overlay Interaction (for rendered annotations)
   ------------------------------ */
.bf-annotation-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;  /* Annotations themselves don't capture events */
    z-index: 4;  /* Above capture layer but below handles */
    /* Use clip-path to exclude bottom 50px where video controls are */
    clip-path: inset(0 0 50px 0);
}

.bf-annotation-wrapper .bf-annotation-shape {
    pointer-events: auto;
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
}

.bf-annotation-wrapper .bf-annotation-handle {
    display: none;
    border: 2px solid currentColor;
    background: rgba(10, 10, 20, 0.65);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.bf-annotation-wrapper.annotation-active .bf-annotation-handle {
    display: block;
    pointer-events: auto;
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.05);
}

.bf-annotation-wrapper.annotation-active .bf-annotation-handle:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.bf-annotation-wrapper.annotation-active .bf-annotation-shape {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}



/* =========================
   Tag Suggestion Dropdown
   ========================= */
.tag-suggestion-item {
    transition: background-color 0.2s ease;
    position: relative;
}

/* First item (highlighted by default) */
.tag-suggestion-item[data-highlighted="true"] {
    background-color: rgba(74, 144, 226, 0.3) !important;
    color: #FFF !important;
}

/* Hover on highlighted item */
.tag-suggestion-item[data-highlighted="true"]:hover {
    background-color: rgba(74, 144, 226, 0.5) !important;
}

/* Hover on any item */
.tag-suggestion-item:hover {
    background-color: rgba(74, 144, 226, 0.4) !important;
    color: #FFF !important;
}

/* Custom scrollbar for tag dropdown */
#edit-meta-tags-dropdown::-webkit-scrollbar {
    width: 10px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 5px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb {
    background: #795EB6;
    border-radius: 5px;
    border: 2px solid #1a1a2e;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb:hover {
    background: #8B6FC7;
}
   ========================= */




#edit-meta-tags-dropdown::-webkit-scrollbar {
    width: 10px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 5px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb {
    background: #795EB6;
    border-radius: 5px;
    border: 2px solid #1a1a2e;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb:hover {
    background: #8B6FC7;
}





/* Custom scrollbar for tag dropdown */
#edit-meta-tags-dropdown::-webkit-scrollbar {
    width: 10px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 5px;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb {
    background: #795EB6;
    border-radius: 5px;
    border: 2px solid #1a1a2e;
}

#edit-meta-tags-dropdown::-webkit-scrollbar-thumb:hover {
    background: #8B6FC7;
}
