/* Odds Format Switcher */

.odds-format-switcher {
  position: relative;
  display: inline-block;
}

/* Header button */
.odds-fmt-current-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 4px 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: 'Proxima Nova', sans-serif;
  white-space: nowrap;
}

.odds-fmt-current-btn:hover {
  opacity: 0.8;
}

.odds-fmt-current-btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Desktop: full text "Decimal Odds" */
.odds-fmt-header-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Dropdown */
.odds-fmt-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--white-12);
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--black-50);
  min-width: 210px;
  overflow: hidden;
  z-index: 1000;
  animation: oddsFmtFadeIn 0.15s ease-out;
}

@keyframes oddsFmtFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdown option */
.odds-fmt-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--white-90);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Proxima Nova', sans-serif;
  text-align: left;
}

.odds-fmt-option:hover {
  background: var(--white-10);
}

/* Active = blue text, like ThemeSwitcher */
.odds-fmt-option.active {
  color: var(--accent-blue);
}

.odds-fmt-option.active .odds-fmt-name {
  color: var(--accent-blue);
}

.odds-fmt-option.active .odds-fmt-sample {
  color: var(--accent-blue);
  opacity: 0.8;
}

.odds-fmt-option.active .odds-fmt-badge {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(56, 132, 244, 0.12);
  background: rgba(var(--accent-blue-rgb, 56, 132, 244), 0.12);
}

.odds-fmt-option:not(:last-child) {
  border-bottom: 1px solid var(--white-8);
}

/* Left side: badge + name */
.odds-fmt-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Short code badge (EU, US, UK, MY, HK) */
.odds-fmt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid var(--white-20);
  border-radius: 4px;
  color: var(--white-70);
  background: var(--white-6);
  line-height: 1.4;
}

.odds-fmt-name {
  font-size: 13px;
  color: var(--white-90);
  transition: color 0.15s;
}

.odds-fmt-sample {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 400;
  transition: color 0.15s, opacity 0.15s;
}

/* Mobile */
@media (max-width: 768px) {
  .odds-fmt-current-btn {
    padding: 3px 4px;
  }

  /* Hide text on mobile, only icon */
  .odds-fmt-header-text {
    display: none;
  }

  .odds-fmt-current-btn svg {
    width: 16px;
    height: 16px;
  }

  .odds-fmt-dropdown {
    right: -10px;
    min-width: 200px;
  }
}

/* MyTransactionsPage.css - Flat Modern Design */

/* ============================================
   CONTAINER & PAGE LAYOUT
   ============================================ */

.tx-page {
  min-height: 100vh;
  padding: 0 2px;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   HEADER WITH BACK BUTTON
   ============================================ */

.tx-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  z-index: 101;
  height: 44px;
  box-sizing: border-box;
}

.tx-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .tx-back-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.tx-back-btn:active {
  background-color: var(--bg-tertiary);
}

.tx-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   FILTERS SECTION - IDENTICAL TO MYBETSV2
   ============================================ */

.tx-filters-container {
  position: sticky;
  top: 44px;
  z-index: 100;
  background-color: var(--bg-secondary);
  padding: 10px 10px 12px 10px;
  margin-bottom: 8px;
}

/* Quick Filters */
.tx-quick-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.tx-quick-filters button {
  flex: 1 1;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (hover: hover) {
  .tx-quick-filters button:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.tx-quick-filters button.tx-active {
  background-color: var(--accent-blue);
  color: var(--text-primary);
}

/* Advanced Filters */
.tx-advanced-filters {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.tx-filter-group {
  position: relative;
  flex: 1 1;
}

/* Date Input Styling */
.tx-filter-group.tx-date-filter {
  position: relative;
}

.tx-filter-group.tx-date-filter::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 24 24%27 stroke=%27%23888%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z%27/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

.tx-filter-group input[type="date"] {
  width: 100%;
  height: 100%;
  padding: 8px 10px 8px 30px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

@media (hover: hover) {
  .tx-filter-group input[type="date"]:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

/* Date Range Display */
.tx-date-range-display {
  width: 100%;
  height: 100%;
  padding: 8px 10px 8px 30px;
  border: none;
  border-radius: 6px;
  background-color: var(--accent-blue-muted);
  color: var(--accent-blue);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Hide default calendar icon */
.tx-filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Select Styling */
.tx-filter-group.tx-reason-filter {
  position: relative;
}

.tx-filter-group.tx-reason-filter::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 24 24%27 stroke=%27%23888%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M19 9l-7 7-7-7%27/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.tx-filter-group select {
  width: 100%;
  height: 100%;
  padding: 8px 28px 8px 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

@media (hover: hover) {
  .tx-filter-group select:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.tx-filter-group input[type="date"]:focus,
.tx-filter-group select:focus {
  outline: none;
}

/* Clear Button */
.tx-clear-filters {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--accent-red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

@media (hover: hover) {
  .tx-clear-filters:hover {
    background-color: var(--accent-red);
    color: var(--text-primary);
  }
}

.tx-clear-filters svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   TRANSACTION CARDS
   ============================================ */

.tx-container {
  padding: 0 4px;
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 12px 14px;
}

.tx-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tx-card-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

/* Transaction Icons */
.tx-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tx-icon-bet { color: #e74c3c; }
.tx-icon-won { color: #2ecc40; }
.tx-icon-deposit { color: #2ecc40; }
.tx-icon-withdrawal { color: #e74c3c; }
.tx-icon-bonus { color: #f0ad4e; }
.tx-icon-refund { color: #4a90e2; }
.tx-icon-casino { color: #f59e0b; }
.tx-icon-default { color: #888; }

.tx-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tx-type {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tx-type-bet_won { color: #2ecc40; }
.tx-type-deposit { color: #2ecc40; }
.tx-type-bonus { color: #f0ad4e; }
.tx-type-refund { color: #4a90e2; }
.tx-type-bet_placed { color: #e74c3c; }
.tx-type-withdrawal { color: #e74c3c; }
.tx-type-casino_session { color: #f59e0b; }

.tx-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.tx-bet-link {
  font-size: 12px;
  color: #6b8afd;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.tx-bet-link:hover {
  color: #8fa8ff;
}

.tx-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
}

.tx-status-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.tx-status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tx-status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.tx-comment {
  font-size: 11px;
  color: var(--text-quaternary);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tx-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.tx-amount {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.tx-amount.tx-positive { color: #2ecc40; }
.tx-amount.tx-negative { color: #e74c3c; }

.tx-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.tx-card-balance {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--separator);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-arrow {
  color: var(--text-primary);
  font-size: 12px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.tx-no-transactions {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.tx-no-transactions svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

.tx-no-transactions h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin: 0;
}

/* ============================================
   SUMMARY SECTION
   ============================================ */

.tx-summary {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 4px;
}

.tx-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.tx-summary-item {
  background-color: var(--bg-primary);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tx-summary-item.tx-summary-net {
  grid-column: 1 / -1;
  background-color: var(--bg-tertiary);
}

.tx-summary-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tx-summary-value {
  font-size: 18px;
  font-weight: 700;
}

.tx-summary-value.tx-positive { color: #2ecc40; }
.tx-summary-value.tx-negative { color: #e74c3c; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1023px) {
  .tx-header {
    top: 36px;
  }
  .tx-filters-container {
    top: 80px;
  }
}

@media (max-width: 768px) {
  .tx-page {
    padding: 0;
  }

  .tx-filters-container {
    padding: 8px 8px 10px 8px;
  }

  .tx-quick-filters {
    gap: 4px;
  }

  .tx-quick-filters button {
    padding: 5px 6px;
    font-size: 11px;
  }

  .tx-advanced-filters {
    gap: 4px;
  }

  .tx-filter-group input[type="date"] {
    padding: 5px 6px 5px 24px;
    font-size: 11px;
  }

  .tx-filter-group select {
    padding: 5px 22px 5px 6px;
    font-size: 11px;
  }

  .tx-date-range-display {
    padding: 5px 6px 5px 24px;
    font-size: 11px;
  }

  .tx-filter-group.tx-date-filter::before {
    left: 6px;
    width: 12px;
    height: 12px;
  }

  .tx-filter-group.tx-reason-filter::after {
    right: 6px;
    width: 8px;
    height: 8px;
  }

  .tx-clear-filters {
    padding: 5px 8px;
  }

  .tx-container {
    padding: 0 2px;
  }

  .tx-card {
    padding: 10px 12px;
  }

  .tx-icon {
    width: 20px;
    height: 20px;
  }

  .tx-type {
    font-size: 13px;
  }

  .tx-amount {
    font-size: 16px;
  }

  .tx-summary {
    margin: 12px 2px;
    padding: 12px;
  }

  .tx-summary-value {
    font-size: 16px;
  }
}

@media (min-width: 1025px) {
  .tx-page {
    max-width: 800px;
    margin: 0 auto;
  }

  .tx-quick-filters {
    max-width: 400px;
  }
}

/* Focus states */
.tx-quick-filters button:focus,
.tx-filter-group input:focus,
.tx-filter-group select:focus,
.tx-clear-filters:focus {
  outline: none;
}

/* Smooth transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

