/* ============================================
   DETACHED PANEL RESIZE HANDLE STYLES
   ============================================ */

/* Resize handle positioning and base styles */
.floating-section-panel-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  cursor: se-resize;
  z-index: 10;
  background: transparent;
  /* Only show when panel is not collapsed */
  display: block;
  pointer-events: all;
}

/* Hide resize handle when section content is collapsed */
.floating-section-panel .section-content:not(.expanded) ~ .floating-section-panel-resize-handle {
  display: none;
}

/* Visual indicator using pseudo-element with rounded corner */
.floating-section-panel-resize-handle::before {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom-right-radius: 3px;
  transition: border-color 0.2s ease;
}

/* Primary color on hover */
.floating-section-panel-resize-handle:hover::before {
  border-right-color: var(--primary-accent, #007aff);
  border-bottom-color: var(--primary-accent, #007aff);
}

/* Alternative bracket-style indicator (uncomment to use) */
/*
.floating-section-panel-resize-handle::before {
  content: '';
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    -3px -3px 0 -1px rgba(255, 255, 255, 0.2),
    -6px -6px 0 -2px rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.floating-section-panel-resize-handle:hover::before {
  border-right-color: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.7);
  box-shadow: 
    -3px -3px 0 -1px rgba(255, 255, 255, 0.4),
    -6px -6px 0 -2px rgba(255, 255, 255, 0.3);
}
*/

/* ============================================
   PANEL CONTENT AREA ADJUSTMENTS
   ============================================ */

/* When panel has been resized, make content area flex to fill */
.floating-section-panel.resized .section-content {
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}

/* ============================================
   COLLAPSED PANEL HEIGHT OVERRIDE
   ============================================ */

/* Override inline height when collapsed to show only title bar */
.floating-section-panel.resized .section-content:not(.expanded) {
  display: none;
}

/* When collapsed and resized, let the panel shrink to title height */
.floating-section-panel.resized:has(.section-content:not(.expanded)) {
  height: auto !important;
  min-height: 0 !important;
}

/* ============================================
   PANEL LAYOUT (if using flexbox)
   ============================================ */

/* Ensure floating panels use flexbox for proper content sizing */
.floating-section-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
}

/* ============================================
   TRANSITION DISABLING
   ============================================ */

/* Class to temporarily disable transitions during resize */
.floating-section-panel.no-transition {
  transition: none !important;
}

.floating-section-panel.no-transition * {
  transition: none !important;
}
