/* style.css - Consolidated styles for Informatron application */

/* =================== GLOBAL STYLES =================== */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
}

footer {
  margin-top: auto;
}

/* =================== TYPOGRAPHY =================== */
.text-primary {
  color: #4CA1AF !important;
}

.help-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* =================== LAYOUT ELEMENTS =================== */
.page-header {
  background-color: rgba(0, 123, 255, 0.1);
  border-left: 5px solid #007bff;
  padding: 20px;
  margin-bottom: 2rem;
}

.page-header .lead {
  color: #6c757d;
}

/* =================== NAVIGATION =================== */
/* Navbar and navigation */
.navbar-dark .navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.avatar-circle {
  width: 30px;
  height: 30px;
  background-color: #4ca1af;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.dropdown-header {
  font-weight: bold;
  color: #333;
}

/* Tab navigation */
.nav-tabs .nav-link {
  color: #495057;
  border-radius: 0.25rem 0.25rem 0 0;
  margin-right: 5px;
}

.nav-tabs .nav-link.active {
  font-weight: bold;
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

/* =================== CARDS & TABLES =================== */
.card {
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
  margin-bottom: 1rem;
}

.card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.form-card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  border: none;
}

.metric-card, .provider-card, .feature-card {
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.metric-card:hover, 
.provider-card:hover,
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 10px;
  height: 100%;
}

.feature-card {
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-footer {
  background-color: rgba(0, 0, 0, 0.02);
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Provider cards */
.provider-card.selected {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.05);
}

.provider-card.selected .card-header {
  background-color: #0d6efd;
  color: white;
}

.provider-card {
  cursor: pointer;
}

.point-card {
  height: 100%;
}

.table-selected {
  background-color: rgba(13, 110, 253, 0.2) !important;
}

.selectable-row {
  cursor: pointer;
}

.selectable-row:hover {
  background-color: rgba(0,0,0,0.05) !important;
}

.delete-card {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 0.5rem;
  border: none;
}

.affected-item {
  padding: 0.5rem;
  background-color: rgba(0,0,0,0.03);
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

/* =================== BADGES, LABELS & HIGHLIGHTS =================== */
.badge {
  padding: 0.5em 0.75em;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.badge.bg-success {
  background-color: #28a745;
  color: white;
}

.badge.bg-info {
  background-color: #17a2b8;
  color: white;
}

.badge.bg-warning {
  background-color: #ffc107;
  color: black;
}

.badge.bg-purple {
  background-color: #6f42c1;
  color: white;
}

.bg-feature-badge {
  background-color: #4CA1AF;
}

.type-badge {
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
  border-radius: 0.25rem;
  background-color: rgba(0, 0, 0, 0.1);
  color: #495057;
  margin-left: 5px;
}

/* =================== BUTTONS & INTERACTIONS =================== */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-left: 5px;
}

.add-metric-btn:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.metric-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.metric-card:hover .metric-actions {
  opacity: 1;
}

.dropdown-menu {
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
}

.form-check {
  padding-left: 2em;
  margin-bottom: 1rem;
}

.form-switch .form-check-input {
  width: 2.5em;
  margin-left: -2.5em;
}

.search-box {
  margin-bottom: 20px;
}

/* =================== METRICS & DATA ICONS =================== */
.metric-type-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.type-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
}

.icon-user { background-color: rgba(0, 123, 255, 0.2); color: #007bff; }
.icon-entry { background-color: rgba(40, 167, 69, 0.2); color: #28a745; }
.icon-usage { background-color: rgba(255, 193, 7, 0.2); color: #ffc107; }
.icon-custom { background-color: rgba(111, 66, 193, 0.2); color: #6f42c1; }
.icon-unknown { background-color: rgba(108, 117, 125, 0.2); color: #6c757d; }

.metric-count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  margin-left: 10px;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.stat-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #007bff;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #4CA1AF;
}

/* =================== LINKS & NAVIGATION =================== */
.metric-link {
  color: inherit;
  text-decoration: none;
}

.metric-link:hover {
  color: inherit;
  text-decoration: none;
}

/* =================== SECTIONS & CONTAINERS =================== */
.dashboard-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.getting-started-steps .step {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.getting-started-steps .step:last-child {
  margin-bottom: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #4ca1af;
  color: white;
  font-weight: bold;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-content {
  flex-grow: 1;
}

.step-content h6 {
  margin-bottom: 0.25rem;
}

.comparison-container {
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 1rem;
  margin-top: 1rem;
  background-color: #f8f9fa;
}

.comparison-scroll {
  max-height: 600px;
  overflow-y: auto;
}

.chart-container {
  height: 300px;
  margin: 1.5rem 0;
  position: relative;
  width: 100%;
}

.conditional-section {
  padding: 1rem;
  background-color: rgba(0,0,0,0.02);
  border-radius: 0.5rem;
  margin-top: 1rem;
  display: none;
}

.zoom-warning {
  display: none;
  padding: 8px 16px;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.metric-group {
  margin-bottom: 20px;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-group-header {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #495057;
  display: flex;
  align-items: center;
}

.footer-info {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #6c757d;
  font-size: 0.9rem;
}

.predefined-metrics {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

/* =================== HOME PAGE SPECIFIC =================== */
.hero-section {
  background: linear-gradient(135deg, #4a6bff 0%, #2948ff 100%);
  color: white;
  padding: 5rem 0;
  margin-bottom: 3rem;
  border-radius: 0 0 10px 10px;
}

.cta-section {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 2rem;
}

.section-heading {
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-heading:after {
  content: '';
  position: absolute;
  width: 50%;
  height: 3px;
  background-color: #4CA1AF;
  bottom: -10px;
  left: 25%;
}

.metric-badge {
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  font-weight: 500;
}

.user-badge {
  background-color: #e3f2fd;
  color: #0d6efd;
}

.entry-badge {
  background-color: #f0fdf4;
  color: #15803d;
}

.usage-badge {
  background-color: #fef3c7;
  color: #d97706;
}

/* Diff comparison styles */
.diff-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.diff-stat {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.diff-stat i {
  margin-right: 0.5rem;
}

.added {
  background-color: #d4edda;
  color: #155724;
}

.removed {
  background-color: #f8d7da;
  color: #721c24;
}

.changed {
  background-color: #fff3cd;
  color: #856404;
}

.unchanged {
  background-color: #e2e3e5;
  color: #383d41;
}

.change-highlight-added {
  background-color: rgba(40, 167, 69, 0.2);
}

.change-highlight-removed {
  background-color: rgba(220, 53, 69, 0.2);
}

.change-highlight-changed {
  background-color: rgba(255, 193, 7, 0.2);
}

.change-value {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin: 0.1rem 0;
}

.old-value {
  background-color: rgba(220, 53, 69, 0.1);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.new-value {
  background-color: rgba(40, 167, 69, 0.1);
}

/* =================== RESPONSIVE ADJUSTMENTS =================== */
@media (max-width: 767.98px) {
  .hero-section {
      padding: 2rem 1rem;
  }
  
  .display-4 {
      font-size: 2.5rem;
  }
  
  .stat-number {
      font-size: 1.5rem;
  }
}


