/* Widget Add Button Styles */
.widget-add-button {
  border: 2px dashed #adb5bd;
  border-radius: 8px;
  background-color: rgba(248, 249, 250, 0.7);
  padding: 10px;
  text-align: center;
  height: 40px;
  min-width: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
}

.widget-add-button:hover {
  border-color: var(--orange);
  background-color: rgba(228, 72, 15, 0.05);
}

.widget-add-button i {
  font-size: 1.2rem;
  color: #adb5bd;
  margin-right: 0.5rem;
}

.widget-add-button:hover i {
  color: var(--orange);
}

.widget-add-button span {
  font-size: 0.9rem;
  color: #6c757d;
}

.widget-add-button:hover span {
  color: var(--orange);
}/* Native widget integration */
.native-widget-container .card-header,
.native-widget-container .card-body.widget-content {
  display: none;
}

.native-widget-container .widget {
  margin: 0;
  box-shadow: none;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.native-widget-container {
  padding: 0;
  height: 100%;
}

/* Handled double widgets case */
.widget-content .widget {
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
}

.widget-content .widget .widget-header {
  border-radius: 0;
}

/* Make all widget sizes consistent */
.widget-container {
  height: 100%;
  min-height: 300px;
}

.widget-container .card {
  height: 100%;
}

.widget-container .widget {
  height: 100%;
}

.widget-content {
  padding: 0 !important;
  overflow: hidden !important;
}

/* Fix widget body layout */
.widget-body {
  padding: 0;
  overflow: auto;
  height: calc(100% - 50px);
}/* 
 * EBVN Dashboard v2 Styles
 */

/* Global Variables */
:root {
  --orange: rgb(228, 72, 15);
  --blue: rgb(39, 45, 95);
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #495057;
  --border-color: #dee2e6;
  --transition-speed: 0.3s;
}

/* Widget Placeholder Styles */
.widget-placeholder {
  border: 2px dashed #adb5bd;
  border-radius: 8px;
  background-color: rgba(248, 249, 250, 0.7);
  padding: 20px;
  text-align: center;
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.widget-placeholder:hover {
  border-color: var(--orange);
  background-color: rgba(228, 72, 15, 0.05);
}

.widget-placeholder i {
  font-size: 2.5rem;
  color: #adb5bd;
  margin-bottom: 1rem;
}

.widget-placeholder:hover i {
  color: var(--orange);
}

.widget-placeholder p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 0;
}

.widget-placeholder:hover p {
  color: var(--orange);
}

/* Global Styles */
body {
  font-family: 'Public Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #212529;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

.wrapper {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--orange);
  border-color: var(--orange);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: rgba(228, 72, 15, 0.85);
  border-color: var(--orange);
}

.text-primary {
  color: var(--blue) !important;
}

/* Sidebar Styles */
.sidebar {
  min-width: 250px;
  max-width: 250px;
  background: white;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  height: 100vh;
  position: fixed;
  transition: all var(--transition-speed);
}

.sidebar-header {
  padding: 20px;
  background: var(--blue);
}

.sidebar-header h3 {
  color: white;
  margin-bottom: 0;
}

.sidebar ul.components {
  padding: 20px 0;
}

.sidebar ul li a {
  padding: 10px 20px;
  display: block;
  color: var(--dark-gray);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar ul li a:hover {
  background: var(--light-gray);
}

.sidebar ul li.active a {
  background: rgba(228, 72, 15, 0.1);
  color: var(--orange);
  border-left: 4px solid var(--orange);
}

.sidebar .list-unstyled {
  padding: 0;
  margin: 0;
}

.sidebar .list-unstyled li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Content Styles */
#content {
  width: calc(100% - 250px);
  padding: 0;
  margin-left: 250px;
  transition: all var(--transition-speed);
}

.navbar {
  padding: 15px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.navbar .navbar-brand {
  font-size: 1.5rem;
  color: var(--blue);
  margin-left: 20px;
}

/* When sidebar is collapsed */
#content.expanded {
  width: 100%;
  margin-left: 0;
}

.sidebar.collapsed {
  margin-left: -250px;
}

/* Search Bar Styles */
.search-container {
  width: 35%;
  max-width: 500px;
  position: relative;
}

.search-container .input-group {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  transition: all 0.2s;
}

.search-container #clear-search, .search-container #header-search, .search-container .input-group-text {
  border: 0;
}

.search-container .input-group:hover,
.search-container .input-group:focus-within {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: white;
}

.search-container .input-group-text {
  background-color: transparent;
  border-right: none;
  color: var(--orange);
  padding-left: 15px;
}

.search-container .form-control {
  background-color: transparent;
  border-left: none;
  border-right: none;
  padding: 12px 5px;
  font-size: 16px;
}

.search-container .form-control:focus {
  box-shadow: none;
  background-color: transparent;
}

.search-container .btn {
  border-left: none;
  background-color: transparent;
  color: #6c757d;
}

.search-container .btn:hover {
  color: var(--orange);
}

/* User Menu */
.user-menu {
  margin-left: 15px;
}

.user-menu .btn-link {
  color: var(--dark-gray);
}

.user-menu .btn-link:hover {
  color: var(--orange);
}

/* Dashboard Grid */
.dashboard-grid {
  padding: 20px;
}

/* Widget Styles */
.widget-container {
  background: white;
  border-radius: 8px;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
}

.widget-container .card {
  height: 100%;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: white;
}

/* Specific card widget header styles */
.card .widget-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 15px;
}

.card .widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue);
}

/* Widget refresh and remove button styles */
.widget-refresh, .widget-remove {
  margin-left: 5px;
}

/* Ensure proper spacing in widget content */
.card-body.widget-content {
  padding: 1rem;
  overflow: auto;
}

.widget-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
}

.widget-body {
  padding: 0;
  overflow: auto;
  flex: 1;
}

/* Table Styles */
.table {
  margin-bottom: 0;
}

.table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table thead th {
  background-color: var(--light-gray);
  border-bottom: 2px solid var(--border-color);
  color: var(--dark-gray);
  font-weight: 600;
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
  white-space: nowrap;
}

.table td [contenteditable="true"] {
  outline: none;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Status Badge Styles */
.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
}

/* Widget Selection Styles */
.widget-selection {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.widget-selection h3 {
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue);
}

.widget-option {
  background: var(--light-gray);
  border-radius: 8px;
  height: 100%;
  cursor: pointer;
  transition: all 0.2s;
}

.widget-option:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.widget-option-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.widget-option i {
  font-size: 2rem;
  color: var(--orange);
  margin-bottom: 10px;
}

.widget-option span {
  font-weight: 500;
  text-align: center;
}

/* Customize Columns Modal */
.column-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.column-item__checkbox {
  margin-right: 1rem;
}

/* Modal Styles */
.modal-header {
  background-color: var(--blue);
  color: white;
}

.modal-header .btn-close {
  color: white;
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Document widget styles */
.document-list {
  max-height: 400px;
  overflow-y: auto;
}

.document-item {
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  padding: 0.75rem 1.5rem;
}

.document-item:last-child {
  border-bottom: none;
}

.document-icon {
  align-items: center;
  background-color: var(--light-gray);
  border-radius: 0.5rem;
  display: flex;
  font-size: 1.5rem;
  height: 3.5rem;
  justify-content: center;
  margin-right: 1rem;
  width: 3.5rem;
}

.document-icon .fa-file-pdf {
  color: #dc3545;
}

.document-icon .fa-file-word {
  color: #0d6efd;
}

.document-icon .fa-file-excel {
  color: #198754;
}

.document-info {
  flex: 1;
}

.document-info h5 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.document-info p {
  font-size: 0.875rem;
  margin: 0;
}

/* Activity log widget styles */
.activity-log {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  align-items: flex-start;
  display: flex;
  margin-bottom: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.activity-icon {
  align-items: center;
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 1rem;
  height: 2.5rem;
  justify-content: center;
  margin-right: 1rem;
  min-width: 2.5rem;
  width: 2.5rem;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.activity-time {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Statistics widget styles */
.stats-card {
  background-color: var(--light-gray);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.stats-card-header {
  background-color: var(--medium-gray);
  font-weight: 500;
  padding: 0.75rem 1rem;
}

.stats-card-body {
  padding: 1rem;
}

/* Export related styles */
.widget-export-indicator {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.widget-export-indicator.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-export-indicator .spinner-border {
  margin-right: 0.5rem;
}

/* Toast notification styles */
.toast-container {
  z-index: 1100;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .sidebar {
    margin-left: -250px;
  }
  
  .sidebar.active {
    margin-left: 0;
  }
  
  #content {
    width: 100%;
    margin-left: 0;
  }
  
  #content.active {
    margin-left: 250px;
    width: calc(100% - 250px);
  }
  
  .search-container {
    width: 100%;
    margin: 10px 0;
  }
  
  .navbar .navbar-brand {
    margin-left: 0;
  }
  
  .table-responsive {
    border: 0;
  }
  
  .table-responsive table {
    width: 100%;
  }
  
  .table-responsive thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  .table-responsive tr {
    border-bottom: 1px solid var(--border-color);
    display: block;
    margin-bottom: 0.75rem;
  }
  
  .table-responsive td {
    border-bottom: 1px solid var(--border-color);
    display: block;
    font-size: 0.9rem;
    text-align: right;
  }
  
  .table-responsive td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
  
  .table-responsive td:last-child {
    border-bottom: 0;
  }
}
