/*
 * EcoRotas Sidebar Enhancement
 * Additional styles for light sidebar theme
 */

/* Ensure all sidebar text is visible */
.left_col {
  color: #2d3748 !important;
}

/* Profile section styling */
.profile {
}

.profile_pic img {
  border: 2px solid #1a365d;
}

.profile_info h2 {
  color: #ec6a32 !important;
  font-weight: 600;
}

.profile_info span {
  color: #ec6a32 !important;
}

/* Menu separators and dividers */
.menu_section {
  background: rgba(26, 54, 93, 0.05);
  margin: 8px 0;
  padding: 8px 16px;
  border-radius: 4px;
}

.menu_section h3 {
  color: #1a365d !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Sub-menu indicators */
.main_menu .navbar-nav > li > a .fa.right {
  color: #1a365d;
  float: right;
  margin-top: 2px;
}

.main_menu .navbar-nav > li.active > a .fa.right {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

/* Hover states for better UX */
.main_menu .navbar-nav > li > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: #1a365d;
  transform: translateY(-50%);
  transition: height 0.2s ease;
  border-radius: 0 2px 2px 0;
}

.main_menu .navbar-nav > li.active > a::before,
.main_menu .navbar-nav > li:hover > a::before {
  height: 60%;
}

/* Badge styles for notifications in menu */
.nav-badge {
  background: #dc2626;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  text-align: center;
}

/* Search functionality in sidebar if exists */
.sidebar-search {
  padding: 12px;
  background: rgba(26, 54, 93, 0.05);
  border-bottom: 1px solid #b8c5c8;
}

.sidebar-search input {
  background: white;
  border: 1px solid #cbd5e1;
  color: #2d3748;
  border-radius: 6px;
  padding: 8px 12px;
  width: 100%;
  font-size: 13px;
}

.sidebar-search input:focus {
  border-color: #1a365d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Quick actions or buttons in sidebar */
.sidebar-actions {
  padding: 12px;
  background: rgba(26, 54, 93, 0.03);
  border-top: 1px solid #b8c5c8;
}

.sidebar-actions .btn {
  width: 100%;
  margin-bottom: 6px;
  font-size: 12px;
  padding: 6px 12px;
}

/* Dark mode consideration for sidebar */
@media (prefers-color-scheme: dark) {
  .left_col {
    background: #f1f1f1 !important; /* Maintain light sidebar even in dark mode */
  }
}

/* Animation for menu items */
.main_menu .navbar-nav > li {
  opacity: 0;
  animation: slideInLeft 0.4s ease forwards;
}

.main_menu .navbar-nav > li:nth-child(1) { animation-delay: 0.1s; }
.main_menu .navbar-nav > li:nth-child(2) { animation-delay: 0.15s; }
.main_menu .navbar-nav > li:nth-child(3) { animation-delay: 0.2s; }
.main_menu .navbar-nav > li:nth-child(4) { animation-delay: 0.25s; }
.main_menu .navbar-nav > li:nth-child(5) { animation-delay: 0.3s; }
.main_menu .navbar-nav > li:nth-child(6) { animation-delay: 0.35s; }
.main_menu .navbar-nav > li:nth-child(7) { animation-delay: 0.4s; }
.main_menu .navbar-nav > li:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Collapsible menu state adjustments */
.nav-sm .left_col {
  background: #dce3e5;
}

.nav-sm .main_menu .navbar-nav > li > a {
  text-align: center;
  padding: 10px;
}

.nav-sm .main_menu .navbar-nav > li > a i {
  margin-right: 0;
  font-size: 18px;
}

.nav-sm .nav_title {
  background: #c8d1d3;
}

/* Additional visual enhancements */
.left_col::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(26, 54, 93, 0.1) 0%, 
    rgba(26, 54, 93, 0.3) 50%, 
    rgba(26, 54, 93, 0.1) 100%);
  z-index: 1;
}

/* Status indicators */
.menu-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
}

.menu-status.online { background: #10b981; }
.menu-status.busy { background: #f59e0b; }
.menu-status.offline { background: #6b7280; }

/* Tooltip styles for collapsed menu */
.nav-sm .tooltip {
  font-size: 12px;
}

.nav-sm .tooltip-inner {
  background: #1a365d;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
}

/* Custom child menu styling as requested */
.nav li li.current-page a, .nav.child_menu li li a.active, .nav.child_menu li li a:hover {
    color: #f8f8f8;
    background-color: #c7cacb;
}

/* Fix form elements text cutting issues */
.form-control {
    height: auto !important;
    min-height: 38px;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
}

/* Fix input group elements */
.input-group .form-control {
    height: 38px;
    padding: 6px 12px;
}

.input-group-addon {
    height: 38px;
    padding: 6px 12px;
    line-height: 1.4;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix select elements */
select.form-control {
    height: 38px !important;
    line-height: 1.4 !important;
    padding: 6px 12px !important;
}

/* Fix textarea elements */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
    line-height: 1.4 !important;
}

/* Fix label positioning */
.control-label {
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.4;
}

/* Fix form groups spacing */
.form-group {
    margin-bottom: 20px;
}

/* Fix checkbox and radio positioning */
.checkbox, .radio {
    margin-top: 10px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.checkbox label, .radio label {
    min-height: 20px;
    padding-left: 20px;
    line-height: 1.4;
}

/* Fix button heights */
.btn {
    height: auto !important;
    min-height: 36px;
    padding: 8px 16px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
}

.btn-sm {
    min-height: 30px;
    padding: 5px 10px !important;
    font-size: 12px !important;
}

.btn-lg {
    min-height: 46px;
    padding: 12px 24px !important;
    font-size: 16px !important;
}

/* Fix input with icons */
.has-feedback .form-control {
    padding-right: 42px;
}

/* Fix date picker inputs */
.input-group.date .form-control {
    height: 38px;
}

/* Fix file upload inputs */
input[type="file"].form-control {
    height: auto;
    padding: 8px 12px;
}

/* Fix help text positioning */
.help-block {
    margin-top: 5px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 12px;
}

/* Fix form horizontal layout */
.form-horizontal .control-label {
    padding-top: 9px;
    margin-bottom: 0;
    text-align: right;
}

/* Fix validation states */
.has-error .form-control,
.has-warning .form-control,
.has-success .form-control {
    border-width: 1px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

.has-error .form-control:focus,
.has-warning .form-control:focus,
.has-success .form-control:focus {
    border-color: inherit;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px rgba(0,0,0,.1);
}
