/* SafetyPhoenix Custom Styles */

:root {
  --primary-color: #0d6efd;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --secondary-color: #6c757d;
  --sidebar-width: 250px;
  --header-height: 56px;
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

/* Header Styles */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-brand i {
  margin-right: 0.5rem;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background-color: #ffffff;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  z-index: 1000;
  padding: 1rem 0;
}

.sidebar-sticky {
  position: sticky;
  top: 0;
}

.sidebar-heading {
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.sidebar .nav-link {
  color: #495057;
  border-radius: 0.375rem;
  margin: 0.125rem 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
}

.sidebar .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.sidebar .nav-link i {
  width: 1.25rem;
  text-align: center;
}

/* Main Content with Sidebar */
.content-with-nav {
  margin-left: var(--sidebar-width);
  padding-top: calc(var(--header-height) + 1rem);
  min-height: calc(100vh - var(--header-height));
}

/* Authentication Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container .card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-container .card-body {
  padding: 2rem;
}

/* Dashboard Cards */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info,
.card.bg-danger,
.card.bg-secondary {
  border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body,
.card.bg-danger .card-body,
.card.bg-secondary .card-body {
  padding: 1.5rem;
}

/* Module Status */
.module-locked {
  opacity: 0.6;
}

.module-locked .card {
  border-color: #dee2e6;
}

.module-active .card {
  border-color: var(--success-color);
}

/* Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-group .btn {
  border-radius: 0.5rem;
}

.btn-group .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group .btn:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Tables */
.table {
  border-radius: 0.75rem;
  overflow: hidden;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Alerts */
.alert {
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: #d1eddd;
  color: #0f5132;
}

.alert-warning {
  background-color: #fff3cd;
  color: #664d03;
}

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

.alert-info {
  background-color: #cff4fc;
  color: #055160;
}

/* Progress Bars */
.progress {
  height: 0.75rem;
  border-radius: 0.5rem;
  background-color: #e9ecef;
}

.progress-bar {
  border-radius: 0.5rem;
}

/* Forms */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Modal */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  border-radius: 1rem 1rem 0 0;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 1rem 1rem;
}

/* Footer */
.footer {
  margin-top: auto;
  margin-left: var(--sidebar-width);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .content-with-nav {
    margin-left: 0;
  }
  
  .footer {
    margin-left: 0;
  }
  
  .auth-container {
    padding: 1rem;
  }
  
  .auth-container .card-body {
    padding: 1.5rem;
  }
}

/* Loading States */
.spinner-border {
  width: 2rem;
  height: 2rem;
}

/* Custom Icons */
.bi {
  vertical-align: -0.125em;
}

/* Utility Classes */
.text-decoration-none:hover {
  text-decoration: none !important;
}

.cursor-pointer {
  cursor: pointer;
}

.border-dashed {
  border-style: dashed !important;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Module specific styles */
.module-content ul {
  padding-left: 1.5rem;
}

.module-content li {
  margin-bottom: 0.5rem;
}

/* Lock icon styling */
.nav-link[data-locked="true"] {
  position: relative;
}

.nav-link[data-locked="true"]:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

/* Social media links styling - fix underscore issue */
.social-links a {
  text-decoration: none !important;
  display: inline-block;
  position: relative;
}

.social-links a::after {
  content: none !important;
  display: none !important;
}

.social-links i {
  display: inline-block;
  font-style: normal;
  line-height: 1;
}

/* Hide any text that might appear after Font Awesome icons */
.social-links a {
  font-size: 0;
}

.social-links i {
  font-size: 1rem;
}

/* Print styles */
@media print {
  .sidebar,
  .navbar,
  .footer {
    display: none !important;
  }
  
  .content-with-nav {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }
  
  .card {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
  }
}
