/* DiVui API - Main Stylesheet */

/* CSS Variables */
:root {
  --primary: #ff5700;
  --secondary: #0099ff;
  --success: #198754;
  --info: #0dcaf0;
  --warning: #ffc107;
  --danger: #dc3545;
  --gray: #6c757d;
  --light: #f8f9fa;
  --dark: #212529;
  --border-color: rgba(0, 0, 0, 0.125);
  --hover-bg: rgba(0, 0, 0, 0.025);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Base Styles */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Typography */
.price {
  color: var(--primary);
  font-weight: 600;
}

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

.text-break {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* Layout Components */
.container {
  max-width: 1200px;
}

/* Navigation */
.navbar-brand img {
  height: 36px;
}

/* Footer */
footer {
  background: #555555;
  color: #fff;
  padding: 1rem 0;
  margin-top: 3rem;
}

/* Cards */
.card {
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 0.75rem;
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  border-radius: 0.75rem 0.75rem 0 0 !important;
  background-color: var(--light) !important;
}

.card-body {
  padding: 1.5rem;
}

/* Tables */
.table-hover > tbody > tr:hover {
  background-color: var(--hover-bg);
}

td.price,
th.price {
  text-align: right;
  white-space: nowrap;
}

.table-responsive {
  border-radius: 0.5rem;
}

/* Badges */
.badge {
  font-size: 0.8em;
  padding: 0.5em 0.8em;
  border-radius: 0.5rem;
  font-weight: 500;
}

.badge.fs-6 {
  font-size: 1rem !important;
  padding: 0.6em 1em;
}

/* Status Colors */
.bg-success {
  background-color: var(--success) !important;
  color: white !important;
}

.bg-info {
  background-color: var(--info) !important;
  color: white !important;
}

.bg-warning {
  background-color: var(--warning) !important;
  color: var(--dark) !important;
}

.bg-danger {
  background-color: var(--danger) !important;
  color: white !important;
}

.bg-secondary {
  background-color: var(--gray) !important;
  color: white !important;
}

/* Border Colors */
.border-primary {
  border-color: var(--primary) !important;
}

.border-success {
  border-color: var(--success) !important;
}

/* Icons */
.bi {
  margin-right: 0.5rem;
}

/* Forms */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 87, 0, 0.25);
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #e04e00;
  border-color: #e04e00;
}

/* Pagination */
.pagination {
  margin-bottom: 0;
}

.page-link {
  color: var(--primary);
}

.page-link:hover {
  color: #e04e00;
}

.page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Loading Spinner */
.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.spinner-border-primary {
  color: var(--primary);
}

/* Alerts */
.alert {
  border-radius: 0.5rem;
  border: none;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #e04e00;
  text-decoration: underline;
}

/* Custom Utilities */
.border-bottom {
  border-bottom: 1px solid #dee2e6;
}

.border-bottom-0 {
  border-bottom: none !important;
}

.w-100 {
  width: 100% !important;
}

/* Responsive Design */

/* Large screens and up (992px+) */
@media (min-width: 992px) {
  .card-body {
    padding: 2rem;
  }
}

/* Medium screens and down (991.98px and down) */
@media (max-width: 991.98px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-body {
    padding: 1rem;
  }

  .badge.w-100 {
    font-size: 0.9em;
    padding: 0.5rem;
    text-align: center;
  }

  /* Mobile table alternatives */
  .mobile-card-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }

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

/* Small screens and down (575.98px and down) */
@media (max-width: 575.98px) {
  .fs-5 {
    font-size: 1.1rem !important;
  }

  .fs-4 {
    font-size: 1.3rem !important;
  }

  h3 {
    font-size: 1.2rem;
  }

  .card-header h5 {
    font-size: 1rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  /* Compact navigation */
  .navbar-brand img {
    height: 30px;
  }

  /* Compact pagination */
  .pagination .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Better spacing */
  .mt-4 {
    margin-top: 1.5rem !important;
  }

  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
}

/* Extra small screens (480px and down) */
@media (max-width: 480px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .card-header {
    padding: 0.75rem;
  }

  .card-body {
    padding: 0.5rem;
  }

  .btn {
    font-size: 0.875rem;
  }

  .badge {
    font-size: 0.75em;
    padding: 0.4em 0.6em;
  }
}

/* Print Styles */
@media print {
  .navbar,
  footer,
  .btn,
  .pagination {
    display: none !important;
  }

  .card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  .badge {
    border: 1px solid #ddd;
  }
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* Accessibility Improvements */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus states for better accessibility */
.btn:focus,
.form-control:focus,
.page-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Animation for better UX */
.card {
  transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn {
  transition: all 0.15s ease-in-out;
}

.badge {
  transition: all 0.15s ease-in-out;
}
