/* DConnect Custom Styles - Condensed Layout with SVG Icons */

/* ==========================================================================
   SVG Icon Styles
   ========================================================================== */

.icon-svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke: currentColor;
}

.icon-svg.icon-sm {
  width: 0.875em;
  height: 0.875em;
}

.icon-svg.icon-lg {
  width: 1.5em;
  height: 1.5em;
}

.icon-svg.icon-xl {
  width: 2em;
  height: 2em;
}

/* Color variants */
.icon-svg.text-primary {
  stroke: var(--tblr-primary);
}

.icon-svg.text-success {
  stroke: var(--tblr-success);
}

.icon-svg.text-secondary {
  stroke: var(--tblr-secondary);
}

.icon-svg.text-warning {
  stroke: var(--tblr-warning);
}

.icon-svg.text-info {
  stroke: var(--tblr-info);
}

.icon-svg.text-danger {
  stroke: var(--tblr-danger);
}

.icon-svg.text-muted {
  stroke: var(--tblr-muted);
}

/* ==========================================================================
   Layout & Structure
   ========================================================================== */

/* Condensed layout adjustments */
.layout-condensed .page-header {
  margin-bottom: 1rem;
}

.layout-condensed .page-body {
  padding-bottom: 1.5rem;
}

/* ==========================================================================
   Status Indicators
   ========================================================================== */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online,
.status-dot.status-dot-animated {
  background-color: var(--tblr-success);
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background-color: var(--tblr-gray-400);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Live indicator in navbar */
#connection-dot {
  width: 8px;
  height: 8px;
}

#connection-status {
  font-size: 0.75rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */

/* Card link hover effect */
.card-link {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Small cards */
.card-sm .card-body {
  padding: 1rem;
}

/* Session cards */
.session-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Badges & Tags
   ========================================================================== */

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.feature-tag.active {
  background-color: var(--tblr-success-lt);
  color: var(--tblr-success);
}

.feature-tag.inactive {
  background-color: var(--tblr-gray-100);
  color: var(--tblr-gray-600);
}

/* ==========================================================================
   Avatar Improvements
   ========================================================================== */

.avatar-rounded {
  border-radius: 50%;
}

/* Ensure icons in avatars are centered */
.avatar img.icon-svg {
  display: block;
  margin: auto;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1055;
}

/* ==========================================================================
   Terminal Styles
   ========================================================================== */

.terminal-container {
  background: #0d1117;
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.875rem;
  color: #e6edf3;
  min-height: 400px;
  overflow: auto;
}

/* ==========================================================================
   File Manager Styles
   ========================================================================== */

.file-item {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease;
}

.file-item:hover {
  background-color: var(--tblr-gray-100);
}

.file-item.selected {
  background-color: var(--tblr-primary-lt);
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--tblr-gray-400);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tblr-gray-500);
}

/* ==========================================================================
   Card Background Colors
   ========================================================================== */

.card.bg-primary .text-primary-fg,
.card.bg-success .text-success-fg,
.card.bg-warning .text-warning-fg,
.card.bg-danger .text-danger-fg,
.card.bg-info .text-info-fg {
  color: inherit;
}

.card.bg-primary .h1,
.card.bg-success .h1,
.card.bg-warning .h1,
.card.bg-danger .h1,
.card.bg-info .h1 {
  color: inherit;
}

/* ==========================================================================
   Active Navigation
   ========================================================================== */

.navbar-nav .nav-item.active .nav-link {
  color: var(--tblr-primary);
  background-color: var(--tblr-primary-lt);
}

.navbar-nav .nav-item.active .nav-link .nav-link-icon {
  color: var(--tblr-primary);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767.98px) {
  .card-sm .card-body {
    padding: 0.75rem;
  }
  
  .avatar-xl {
    width: 3rem;
    height: 3rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: auto;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-img img.icon-svg {
  opacity: 0.5;
}

/* ==========================================================================
   Breadcrumb Layout
   ========================================================================== */

.page-breadcrumbs .breadcrumb {
  flex-wrap: nowrap;
  white-space: nowrap;
}
