/**
 * Browse Mode Specific Styles
 * Phase 2 - Browse mode navigation, toolbar, and controls
 */

/* Browse Sidebar - with margin to match toolbar */
.browse-sidebar {
  margin: 10px;
  border-radius: 6px;
  height: calc(100% - 20px);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 100;
  background: var(--header-blue-90);
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--header-blue);
  transform: scale(1.05);
}

.hamburger-icon {
  display: inline-block;
  line-height: 1;
}


/* Browse Toolbar Container with dark blue background */
.browse-content {
  position: relative;
  display: flex;
  flex-direction: column;
}

.browse-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--toolbar-height) + var(--toolbar-margin) * 2);
  background: var(--dark-blue);
  z-index: 0;
}

/* Browse Toolbar */
.browse-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--toolbar-height);
  padding: 0 20px;
  background: var(--header-blue);
  border-top: none;
  gap: 20px;
  flex-wrap: wrap;
  margin: var(--toolbar-margin);
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

/* View toggle - position on left */
.browse-toolbar > #view-toggle-group {
  position: absolute;
  left: 10px;
}

.browse-toolbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Toolbar Navigation and Context */
.toolbar-nav-context {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.toolbar-nav-context .nav-arrow {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-nav-context .nav-arrow img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) invert(1);
}

.toolbar-nav-context .nav-arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.toolbar-nav-context .nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.toolbar-context-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 200px;
}

.toolbar-context-info .context-info {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.toolbar-context-info .column-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* Action Buttons */
.browse-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.action-btn .static-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-bottom: 8px;
}

.action-btn:hover .static-tooltip {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toolbar-context-info .context-info {
    font-size: 14px;
  }

  .toolbar-context-info .column-info {
    font-size: 11px;
  }

  .toolbar-nav-context .nav-arrow img {
    width: 20px;
    height: 20px;
  }

  .browse-toolbar {
    padding: 0;
    gap: 12px;
  }

  .action-btn {
    padding: 6px 10px;
  }

  .action-btn img {
    width: 18px;
    height: 18px;
  }

  .static-tooltip {
    display: none;
  }
}

@media (max-width: 480px) {
  .browse-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle-group {
    justify-content: center;
  }

  .toolbar-context-info {
    align-items: center;
    text-align: center;
  }

  .browse-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Browse Bookmark Indicator */
.browse-bookmark-indicator {
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.browse-bookmark-indicator svg {
  width: 100%;
  height: 100%;
}

.browse-bookmark-indicator:hover {
  color: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

/* Owner state - solid white (bookmarked by current user) */
.browse-bookmark-indicator.owner {
  color: white;
}

.browse-bookmark-indicator.owner:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Collaborator state - lighter blue */
.browse-bookmark-indicator.collaborator {
  color: var(--sidebar-accent-blue);
}

.browse-bookmark-indicator.collaborator:hover {
  color: var(--focus-blue);
}

/* Browse Display Area with Navigation Arrows */
.browse-display-area {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 20px;
  background: var(--dark-blue);
  overflow: hidden;
  gap: 10px;
  position: relative;
  min-height: 0;
}

.browse-display-area .nav-arrow {
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  padding: 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
}

.browse-display-area .nav-arrow img {
  width: 60px;
  height: 60px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.2s ease;
}

.browse-display-area .nav-arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05) !important;
}

.browse-display-area .nav-arrow:hover:not(:disabled) img {
  opacity: 1;
}

.browse-display-area .nav-arrow:disabled {
  cursor: not-allowed !important;
  opacity: 0.4 !important;
}

.browse-display-area .nav-arrow:disabled img {
  opacity: 0.3;
}

/* Ensure text-display fills available space */
.browse-display-area .text-column {
  flex: 1;
  min-width: 0;
}
