/* Custom styles for Sports Betting Tracker */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@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;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
}

main {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
  padding: 1rem 0;
  background-color: #fff;
}

/* Custom styles for the betting tracker */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 0.75rem 1.25rem;
}

.navbar {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: bold;
  color: #28a745 !important;
}

/* Navbar logo styling */
.navbar-logo {
  height: 32px;
  width: auto;
  max-width: 100%;
}

.table th {
  background-color: #f8f9fa;
}

/* Badge styles */
.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
}

.badge.bg-success, .badge.bg-danger, .badge.bg-warning, .badge.bg-secondary {
  font-weight: 500;
}

/* Form styles */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Inline Editing styles */
.editable {
  cursor: pointer;
  position: relative;
}

.editable:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.editable.edit-mode {
  padding: 0;
}

.editable .edit-control {
  margin: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.editable .display-value {
  display: block;
  padding: 0.5rem;
}

/* Mobile optimizations */
@media (max-width: 767.98px) {
  /* Fix logo cutoff on mobile */
  .navbar-brand {
    max-width: calc(100vw - 120px); /* Leave room for quick add button + hamburger menu */
    overflow: hidden;
  }
  
  .navbar-logo {
    height: 28px !important; /* Slightly smaller on mobile */
    width: auto;
    max-width: 100%;
  }
  
  /* Mobile quick add button styling - Square and positioned right */
  .mobile-quick-add {
    padding: 0.375rem 0.5rem;
    font-size: 1rem;
    border-radius: 0.375rem; /* Square with slightly rounded corners */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .mobile-quick-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
  }
  
  /* Position the mobile quick add container to align with hamburger menu */
  .d-sm-none.me-2 {
    margin-left: auto; /* Push to the right side */
    margin-right: 0.5rem; /* Small gap between + button and hamburger menu */
  }
  
  /* Ensure navbar items are properly spaced */
  .navbar-toggler {
    margin-left: 0;
  }
  
  /* Mobile Bet Cards Styling */
  .mobile-bet-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: #fff;
  }
  
  .mobile-bet-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
  }
  
  .bet-header-info {
    flex: 1;
  }
  
  .bet-match-info {
    border-left: 3px solid #007bff;
    padding-left: 0.75rem;
  }
  
  .bet-details-row {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin: 0 -0.25rem;
  }
  
  .bet-details-row .col-3 {
    padding: 0.25rem;
  }
  
  .bet-extra-details {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
  }
  
  /* Compact filters on mobile */
  .row.g-3 .col-md-2 {
    margin-bottom: 0.5rem;
  }
  
  /* Hide some filter labels on mobile to save space */
  .col-md-2 .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .table-responsive {
    margin-bottom: 2rem;
  }

  .container {
    padding-bottom: 2rem;
  }

  /* Improved button groups on mobile */
  .btn-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .btn-group .btn {
    flex: 1;
    white-space: nowrap;
    min-width: auto;
  }

  /* Better form layout on mobile */
  .row.g-3 > [class*="col-"] {
    margin-bottom: 1rem;
  }

  /* Improved table responsiveness */
  .table {
    font-size: 0.875rem;
  }

  /* Sticky header for mobile */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  /* Better padding for mobile forms */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Better spacing for mobile filters */
  .filters-container {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  /* Better modal display on mobile */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1rem;
  }
}