html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8f9fc;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Custom styles for Azure Cost Portal */
.border-left-primary {
  border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
  border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
  border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
  border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
  border-left: 0.25rem solid #e74a3b !important;
}

.text-xs {
  font-size: 0.7rem;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-gray-300 {
  color: #dddfeb !important;
}

.shadow {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid #e3e6f0;
  border-radius: 0.35rem;
}

.card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

.chart-area {
  position: relative;
  height: 10rem;
  width: 100%;
}

.chart-pie {
  position: relative;
  height: 15rem;
  width: 100%;
}

/* Loading spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Custom table styles */
.table th {
  border-top: none;
  font-weight: 600;
  color: #5a5c69;
  background-color: #f8f9fc;
}

.table td {
  vertical-align: middle;
}

/* Badge styles */
.badge {
  font-size: 0.75em;
  font-weight: 600;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-area {
    height: 8rem;
  }
  
  .chart-pie {
    height: 12rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Custom button styles */
.btn-group .dropdown-toggle::after {
  margin-left: 0.5rem;
}

/* Alert styles */
.alert {
  border: none;
  border-radius: 0.35rem;
}

.alert-success {
  background-color: #d1ecf1;
  color: #0c5460;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Form styles */
.form-control:focus {
  border-color: #4e73df;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Navigation styles */
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.nav-link {
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* Modern gradient background */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Improved dropdown menus */
.dropdown-menu-modern {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 240px;
}

.dropdown-menu-modern .dropdown-item {
  border-radius: 0.35rem;
  padding: 0.6rem 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.dropdown-menu-modern .dropdown-item:hover {
  background-color: #f8f9fc;
  transform: translateX(5px);
  padding-left: 1.25rem;
}

.dropdown-menu-modern .dropdown-item i {
  width: 20px;
  font-size: 0.9rem;
}

.dropdown-menu-modern .dropdown-divider {
  margin: 0.5rem 0;
}

/* Text color utilities */
.text-purple {
  color: #6f42c1 !important;
}

/* Footer styles */
.footer {
  background-color: #f8f9fc;
  border-top: 1px solid #e3e6f0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Animation for loading states */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Cost trend indicators */
.cost-increase {
  color: #e74a3b;
}

.cost-decrease {
  color: #1cc88a;
}

.cost-neutral {
  color: #5a5c69;
}

/* Responsive text */
@media (max-width: 576px) {
  .h5 {
    font-size: 1rem;
  }
  
  .h6 {
    font-size: 0.9rem;
  }
}

/* HTMX Loading Indicators */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* HTMX Loading Spinner */
.htmx-indicator .spinner-border {
  width: 1.5rem;
  height: 1.5rem;
}

/* HTMX Request Animation */
.htmx-request {
  opacity: 0.7;
  transition: opacity 200ms ease-in;
}

/* HTMX Swap Animation - Smooth transitions like the HTMX example */
.htmx-swapping {
  opacity: 0;
  transition: opacity 300ms ease-out;
}

/* HTMX Settled Animation - Gentle fade in */
.htmx-settling {
  opacity: 1;
  transition: opacity 300ms ease-in;
}

/* Smooth content transitions */
.htmx-settling img,
.htmx-settling .card,
.htmx-settling .table {
  opacity: 0;
}

img,
.card,
.table {
  transition: opacity 300ms ease-in;
}

/* What-If Pricing Styles */
.table-success-subtle {
  background-color: #d1f4e0 !important;
}

.table-success-subtle:hover {
  background-color: #b8efd1 !important;
}

.savings-highlight {
  font-weight: 600;
  font-size: 1.1em;
}

.region-comparison-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.region-comparison-card:hover {
  border-left: 4px solid #4e73df;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.best-savings-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.pricing-info-icon {
  cursor: help;
  color: #4e73df;
}

.pricing-info-icon:hover {
  color: #2e59d9;
}

/* Currency badge styling */
.badge.bg-light {
  border: 1px solid #dee2e6;
}

/* Savings calculation styles */
.savings-positive {
  color: #1cc88a;
  font-weight: 600;
}

.savings-negative {
  color: #e74a3b;
  font-weight: 600;
}

/* Region display name emphasis */
.region-name-highlight {
  font-weight: 600;
  color: #4e73df;
}

/* Pricing table enhancements */
.table-hover tbody tr:hover {
  background-color: rgba(78, 115, 223, 0.05);
  cursor: pointer;
}

/* Best value indicator */
.best-value-row {
  border-left: 3px solid #1cc88a;
}

/* Alert improvements for What-If */
.alert-success .h5 {
  margin-bottom: 0.25rem;
}

.alert-success small {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Monthly cost emphasis */
.monthly-cost-emphasis {
  font-size: 1.15em;
  font-weight: 700;
  color: #2e59d9;
}

/* Hourly rate display */
.hourly-rate-display {
  font-size: 0.9em;
  color: #5a5c69;
  font-family: 'Courier New', monospace;
}

/* Responsive pricing table */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .savings-highlight {
    font-size: 1em;
  }
}

/* Loading state for pricing data */
.pricing-loading {
  opacity: 0.6;
  pointer-events: none;
}

.pricing-loading::after {
  content: "Loading pricing data...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 1rem 2rem;
  border-radius: 0.35rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  z-index: 1000;
}
