/* Custom Pharmamino Styles */

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

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

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

.slide-in {
  animation: slideIn 0.5s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Utility Classes */
.shadow-custom {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.hover-shadow {
  transition: all 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

/* Card Enhancements */
.card-hover {
  transition: all 0.3s ease;
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Button Enhancements */
.btn-gradient-primary {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  border: none;
  color: white;
}

.btn-gradient-primary:hover {
  background: linear-gradient(135deg, #0a58ca, #084298);
  color: white;
}

.btn-gradient-success {
  background: linear-gradient(135deg, #198754, #146c43);
  border: none;
  color: white;
}

.btn-gradient-success:hover {
  background: linear-gradient(135deg, #146c43, #0f5132);
  color: white;
}

/* Table Enhancements */
.table-hover tbody tr {
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.1);
  transform: scale(1.01);
}

/* Badge Enhancements */
.badge-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* Form Enhancements */
.form-floating > .form-control:focus ~ label {
  color: var(--primary-color);
}

.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
}

.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

/* Loading States */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

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

  body {
    background: white !important;
  }

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

/* Responsive Utilities */
@media (max-width: 768px) {
  .navbar-brand span {
    font-size: 1rem;
  }

  .main-container {
    padding: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* RTL Specific Adjustments */
[dir="rtl"] .dropdown-menu {
  text-align: right;
}

[dir="rtl"] .nav-link i {
  margin-right: 5px;
  margin-left: 0;
}

/* Status Indicators */
.status-pending {
  color: #ffc107;
}

.status-completed {
  color: #198754;
}

.status-cancelled {
  color: #dc3545;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 5px;
}

.status-indicator.pending {
  background-color: #ffc107;
}

.status-indicator.completed {
  background-color: #198754;
}

.status-indicator.cancelled {
  background-color: #dc3545;
}

/* Tooltip Enhancements */
.tooltip-inner {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

/* Modal Enhancements */
.modal-content {
  border: none;
  border-radius: 15px;
}

.modal-header {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  background: linear-gradient(135deg, var(--primary-color), #0a58ca);
  color: white;
}

.modal-footer {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
