.bets-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 1300px;
  margin: 0 auto;
}

.bets-table table {
  width: 100%;
  min-width: 750px;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0px;
}

/* Table Headers */
.bets-table th {
  background: #1a2851;
  padding: 20px 15px;
  text-align: left;
  font-weight: bold;
  color: #f8f9fa;
  font-size: 14px;
  letter-spacing: 1px;
  border-bottom: 1.5px solid #dee2e6;
}

.bets-table th:first-child {
  border-top-left-radius: 8px;
}

.bets-table th:last-child {
  border-top-right-radius: 8px;
}

/* Center align specific columns */
.bets-table th.center-align,
.bets-table td.center-align {
  text-align: center;
}

/* Table Data Cells */
.bets-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f5;
  color: #272f47;
  font-size: 14px;
}

.bets-table tr:last-child td {
  border-bottom: none;
}

.bets-table tr:hover {
  background: #f8f9fa;
}

/* Make table rows clickable */
.bets-table tbody tr {
  cursor: pointer;
}

.bets-table tbody tr:hover {
  background-color: #f0f4f8;
}

.copyable-event {
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.copyable-event:hover {
  color: #1a2851; /* Highlight color on hover */
}

/* Event Cell Styling */
.event-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-cell-main {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
}

/* Event date/time styling */
.event-date-time {
  font-size: 12px;
  color: #868e96;
  margin-top: 2px;
}

/* Indicators row */
.event-indicators {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}

.indicator {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.notes-indicator {
  background: #6c757d;
  cursor: help;
  position: relative;
}

.search-icon-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid #1a2851;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1;
}

.search-icon-btn i {
  color: #1a2851;
  font-size: 18px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.search-icon-btn .search-close-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.search-wrapper.active .search-icon-btn .search-open-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.search-wrapper.active .search-icon-btn .search-close-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.search-icon-btn:hover i.search-open-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.search-wrapper.active .search-icon-btn:hover i.search-close-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.search-wrapper.active .search-icon-btn {
  right: 8px;
  background: transparent;
  border: none;
}

.search-wrapper.active .search-icon-btn:hover {
  background: rgba(26, 40, 81, 0.05);
  border-radius: 50%;
}

.live-indicator {
  background: #1a2851;
}

.clv-indicator {
  background: #27ae60;
}

.clv-indicator-green {
  background: #28a745;
}

.clv-indicator-red {
  background: #dc3545;
}

/* Odds and Stake styling */
.odds {
  background: #f0f4f8;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: bold;
  color: #2d3436;
  display: inline-block;
}

.stake {
  font-weight: 600;
  color: #1a2851;
  white-space: nowrap;
}

/* Status Badge */
.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

.status-badge .status-text {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
}

.status-badge .status-profit {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.95;
}

.status-pending {
  background: #f8f9fa;
  color: #6c757d;
}

.status-win {
  background: #d4edda;
  color: #155724;
}

.status-loss {
  background: #f8d7da;
  color: #721c24;
}
.status-halfwin {
  background: #d4edda;
  color: #0c5460;
}

.status-halfloss {
  background: #f8d7da;
  color: #721c24;
}

.status-void {
  background: #e2e3e5;
  color: #383d41;
}

.status-cashout {
  background: #fff3cd;
  color: #856404;
}

/* Settle Button */
.settle-btn {
  padding: 8px 16px;
  background: #1a2851;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.5px;
  margin: auto;
}

.settle-btn:hover {
  background: #2a3861;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 40, 81, 0.2);
}

/* Action Button (generic for any action column) */
.action-btn {
  padding: 8px 16px;
  background: #1a2851;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-btn:hover {
  background: #2a3861;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 40, 81, 0.2);
}

/* Modal Base Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  margin: 30px auto;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.settle-profit-label {
  font-size: 18px;
  color: #1a2851;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 6px 0;
  font-weight: 700;
}

.edit-bet-modal-content {
  width: 90%;
  max-width: 800px;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e1e8ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.modal-header h2 {
  margin: 0;
  color: #1a2851;
  font-size: 24px;
  font-weight: 600;
}

.modal-close {
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 20px;
}

.modal-close:hover {
  color: #1a2851;
}

.modal-body {
  padding: 20px 30px 30px;
}

/* Bet Preview Card */
.bet-preview-section {
  display: none;
  margin-bottom: 30px;
}

.bet-preview-section.active {
  display: block;
}

.bet-preview-card {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 25px;
  max-width: 900px;
  margin: 0 auto;
}

/* Main container for page content */
.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
}

/* Page header section */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a2851;
}

/* Table section */
.table-section {
  border-radius: 8px;
  padding: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a2851;
}

/* Search wrapper - Match quick_add styling */
.search-wrapper {
  position: relative;
  display: inline-block;
}

.bet-search-input {
  width: 50px;
  height: 40px;
  border: 1px solid #1a2851;
  border-radius: 50px;
  background: white;
  padding: 0;
  font-size: 14px;
  color: #272f47;
  outline: none;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.bet-search-input.expanded {
  width: 300px;
  padding: 0 45px 0 15px;
  cursor: text;
  opacity: 1;
  pointer-events: all;
}

.bet-search-input:focus {
  outline: none;
  border-color: #1a2851;
  box-shadow: 0 0 0 3px rgba(26, 40, 81, 0.1);
}

.search-icon-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid #1a2851;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1;
}

.search-icon-btn i {
  color: #1a2851;
  font-size: 18px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.search-icon-btn .search-close-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.search-wrapper.active .search-icon-btn .search-open-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.search-wrapper.active .search-icon-btn .search-close-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.search-icon-btn:hover i.search-open-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.search-wrapper.active .search-icon-btn:hover i.search-close-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

.search-wrapper.active .search-icon-btn {
  box-shadow: none;
  right: 8px;
  background: transparent;
  border: none;
}

.search-wrapper.active .search-icon-btn:hover {
  background: rgba(26, 40, 81, 0.05);
  border-radius: 50%;
}

/* Sport indicator circle */
.sport-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f4f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sport-indicator .material-icons {
  font-size: 14px;
  color: #1a2851;
}

/* No bets message */
.no-bets-message {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-bets-message h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
}

.no-bets-message p {
  font-size: 14px;
  color: #999;
}

/* Loading state */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e1e4e8;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #1a2851;
  color: white;
  border-color: #1a2851;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-btn.active {
  background: #1a2851;
  color: white;
  border-color: #1a2851;
}

.page-info {
  padding: 0 12px;
  color: #666;
  font-size: 14px;
}

/* Form Sections */
.event-details-section,
.bet-details-section,
.result-section {
  margin-bottom: 25px;
}

.section-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a2851;
  letter-spacing: 0.5px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8ecf1;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabs-navigation {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 2px solid #e1e8ed;
}

.tab-button {
  padding: 10px 20px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #7c8798;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  box-shadow: none;
}

.tab-button:hover {
  color: #1a2851;
  background-color: transparent;
}

.tab-button.active {
  color: #1a2851;
  border-bottom-color: #1a2851;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bet Details Grid */
.bet-details-grid {
  display: grid;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

/* Event Details Grid */
.event-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.form-field .checkbox-wrapper {
  width: 100%;
  background-color: #fafafa;
}

.bet-details-grid > .form-field:nth-child(1),
.bet-details-grid > .form-field:nth-child(2) {
  grid-column: span 2;
}

.bet-details-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Status Select */
.status-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c8798' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
  cursor: pointer;
}

.field-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
  width: 100%;
  min-height: 38px;
}

.field-input:focus {
  outline: none;
  border-color: #1a2851;
  box-shadow: 0 0 0 3px rgba(26, 40, 81, 0.1);
}

.field-input.error {
  border-color: #e74c3c;
  background: #fff5f5;
}

.field-error {
  display: none;
  color: #660000;
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
  text-align: left;
}

.field-error.active {
  display: block;
}

.event-live-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.form-row-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Live Checkbox */
.live-checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.live-checkbox-container:hover {
  background: #e8ecf0;
}

.live-checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.live-checkbox-container label {
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #1a2851;
}

/* Status Buttons */
.settle-status-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.bet-result-section .settle-status-btn.active {
  border-color: #1a2851;
  background: #1a2851;
  color: white;
}

.settle-status-btn {
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.settle-status-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: #1a2851;
  color: #1a2851;
}

.settle-status-btn.active {
  background: #1a2851;
  color: white;
  border-color: #1a2851;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(26, 40, 81, 0.25);
}

/* Specific status colors when active */
.settle-status-btn[data-status="Win"].active {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.settle-status-btn[data-status="Half-win"].active {
  background: #bbf7d0;
  border-color: #bbf7d0;
  color: #15803d;
  box-shadow: 0 4px 12px rgba(187, 247, 208, 0.3);
}

.settle-status-btn[data-status="Loss"].active {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.settle-status-btn[data-status="Half-loss"].active {
  background: #fca5a5;
  border-color: #fca5a5;
  color: #991b1b;
  box-shadow: 0 4px 12px rgba(252, 165, 165, 0.3);
}

.settle-status-btn[data-status="Void"].active {
  background: #9ca3af;
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

.settle-status-btn[data-status="Cashout"].active {
  background: white;
  border-color: #1a2851;
  color: #1a2851;
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(26, 40, 81, 0.25);
}

/* Cashout input area */
#settle-cashout-container {
  border: 1px solid #1a2851;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  margin-bottom: 12px;
  display: none;
  animation: slideDown 0.3s ease;
}

#settle-cashout-container.show {
  display: block;
}

#settle-cashout-container label {
  font-size: 11px;
  color: #1a2851;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}

.settle-cashout-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

#edit-modal-bet-cashout-amount {
  width: 100%;
  padding: 10px 12px 10px 28px; /* Left padding of 28px to make room for currency symbol */
  border: 1px solid #1a2851;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #1a2851;
  background: white;
  transition: all 0.2s ease;
}

.settle-currency-symbol {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #1a2851;
  font-weight: 600;
  font-size: 14px;
  pointer-events: none; /* Makes sure you can't click on the symbol */
  z-index: 1;
}

#settle-cashout-amount {
  width: 100%;
  padding: 10px 12px 10px 28px;
  border: 1px solid #1a2851;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #1a2851;
  background: white;
  transition: all 0.2s ease;
}

#settle-cashout-amount::placeholder {
  color: #1a2851;
  opacity: 0.5;
}

/* Hidden Select */
#edit-modal-status-select {
  display: none;
}

/* Cashout Container */
#edit-modal-cashout-container {
  display: none;
  margin-top: 15px;
}

#edit-modal-cashout-container.active {
  display: block;
}

/* CLV Fields */
.clv-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.clv-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Notes Section */
.notes-container {
  margin-top: 20px;
}

.notes-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
  transition: border-color 0.3s;
}

.notes-textarea:focus {
  outline: none;
  border-color: #1a2851;
  box-shadow: 0 0 0 3px rgba(26, 40, 81, 0.1);
}

.char-counter {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}

.char-counter.warning {
  color: #e74c3c;
}

.settle-profit-row {
  text-align: center;
}

.settle-profit-value {
  font-size: 26px;
  font-weight: 700;
}

.settle-profit-value.neutral {
  color: #6b7280;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

.btn-confirm,
.btn-cancel {
  padding: 12px 28px;
  border: 2px solid;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  gap: 8px;
}

.btn-confirm {
  background: #1a2851;
  color: white;
  border-color: #1a2851;
}

.btn-confirm:hover {
  box-shadow: 0 0 20px rgba(26, 40, 81, 0.3);
  transform: none;
  transform: translateY(-3px);
}

.btn-cancel {
  color: #1a2851;
  border-color: #1a2851;
}

.btn-cancel:hover {
  background: #f8f9fa;
  border-color: #d1d5db;
}

/* Success Message */
.settle-success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #27ae60;
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 10001;
  animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
}

/* Unsaved Changes Modal */
.unsaved-changes-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: fadeIn 0.2s ease;
}

.unsaved-changes-modal.hidden {
  display: none;
}

.unsaved-changes-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  text-align: center;
}

.unsaved-changes-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.unsaved-changes-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a2851;
  margin-bottom: 8px;
}

.unsaved-changes-message {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.4;
}

.unsaved-changes-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unsaved-changes-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
}

.unsaved-changes-btn-discard {
  background: #2c3e50;
  color: white;
}

.unsaved-changes-btn-discard:hover {
  background: #1a2332;
  transform: translateY(-1px);
}

.unsaved-changes-btn-keep {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.unsaved-changes-btn-keep:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .event-details-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .clv-fields-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    margin-bottom: 10px;
  }

  .event-live-row {
    display: contents;
  }

  .event-live-row > .form-field:first-child {
    /* Event Name */
    order: 1;
    flex: 0 0 100%;
    width: 100%;
  }

  .event-live-row > .form-field:last-child {
    /* Event Start Date */
    order: 2;
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
  }

  .tabs-navigation {
    flex-wrap: wrap;
  }

  .tab-button {
    flex: 1;
    min-width: 100px;
    text-align: center;
  }

  .event-details-grid {
    display: contents; /* This removes the wrapper but keeps children */
  }

  .event-details-grid > .form-field:nth-child(1) {
    /* Live Bet */
    order: 3;
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
  }

  .event-details-grid > .form-field:nth-child(2) {
    /* Sport */
    order: 4;
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
  }

  .event-details-grid > .form-field:nth-child(3) {
    /* Country */
    order: 5;
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
  }

  .bet-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bet-details-grid > .form-field:nth-child(1),
  .bet-details-grid > .form-field:nth-child(2) {
    grid-column: 1 / -1;
  }

  /* Stake and Odds - side by side */
  .bet-details-grid > .form-field:nth-child(3),
  .bet-details-grid > .form-field:nth-child(4) {
    grid-column: span 1;
  }

  /* Bookmaker and Source - side by side */
  .bet-details-grid > .form-field:nth-child(5),
  .bet-details-grid > .form-field:nth-child(6) {
    grid-column: span 1;
  }

  .edit-bet-modal-content {
    width: 95%;
    margin: 15px auto;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-body {
    padding: 15px;
  }

  .settle-status-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-confirm,
  .btn-cancel {
    width: 100%;
    justify-content: center;
  }
}

/* Profit/Loss Display */
.profit-loss {
  font-weight: 600;
}

.profit-loss.positive {
  color: #27ae60;
}

.profit-loss.negative {
  color: #e74c3c;
}

.profit-loss.neutral {
  color: #6c757d;
}

/* Pending status text */
.outcome-pending {
  color: #6c757d;
  font-style: italic;
}

.pagination-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 38px;
  border: 1px solid #ddd;
  justify-content: center;
}

.checkbox-wrapper:hover {
  border-color: #1a2851;
  background: #f8fafc;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.clv-info-box {
  background: #e8f4fd;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #2c5282;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clv-warning-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #856404;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-result-section .settle-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bet-result-section .settle-status-btn {
  padding: 14px 10px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.bet-result-section #edit-bet-cashout-container {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #1a2851;
  border-radius: 8px;
}

.pagination-minimal button {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #1a2851;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  box-shadow: none;
}

.pagination-minimal button:hover:not(:disabled) {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.pagination-minimal button:disabled {
  color: #adb5bd;
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.pagination-minimal .page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-minimal .page-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pagination-minimal .page-number:hover {
  background: #f8f9fa;
  color: #1a2851;
}

.pagination-minimal .page-number.active {
  background: #1a2851;
  color: #fff;
  font-weight: 600;
}

.pagination-minimal .page-dots {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  user-select: none;
  pointer-events: none;
}

/* Autocomplete dropdown styles */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #f0f4ff;
}

.autocomplete-item strong {
  color: #1a2851;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bet-result-section .settle-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page {
    gap: 4px;
    margin-top: 20px;
    padding-top: 15px;
  }

  .page__btn {
    width: 32px;
    height: 32px;
  }

  .page__btn .material-icons {
    font-size: 18px;
  }

  .page__numbers {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .pagination-minimal {
    gap: 10px;
  }

  .pagination-minimal button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .pagination-minimal .page-number {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .pagination-minimal .page-numbers {
    gap: 4px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .bets-table {
    position: relative;
    margin: 0 -10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bets-table th {
    padding: 12px 10px;
    font-size: 12px;
  }

  .bets-table td {
    padding: 12px 10px;
    font-size: 13px;
  }
}

.field-label {
  font-weight: 600;
  color: #555;
  font-size: 14px;
  min-width: 120px;
}

.btn-delete {
  padding: 12px 28px;
  border: 2px solid #dc3545;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc3545;
}

.btn-delete:hover {
  background: transparent;
  color: #dc3545;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Adjust action buttons layout for 3 buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

/* Make buttons slightly smaller to fit 3 */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
  }

  .btn-confirm,
  .btn-cancel,
  .btn-delete {
    width: 100%;
    justify-content: center;
  }
}
