/* ─── BookersBet 買い目ブロック ─── */

/* Date selector */
.bookers-bet__date-section {
  margin-bottom: 8px;
}

.bookers-bet__date-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bookers-bet__nav-btn {
  font-size: 0.7rem;
  padding: 5px 8px;
  border: 1px solid #DBDEDF;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  flex-shrink: 0;
}

.bookers-bet__date-btn {
  flex: 1;
  font-size: 0.75rem;
  padding: 5px 0;
  border: 1px solid #DBDEDF;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  min-width: 0;
  text-align: center;
}

.bookers-bet__date-btn--weekend {
  background: #f5f5f5;
  border-color: #ccc;
  color: #333;
}

.bookers-bet__date-btn--selected {
  background: #333;
  color: #fff;
  border-color: #333;
}

.bookers-bet__date-btn:hover,
.bookers-bet__nav-btn:hover {
  opacity: 0.8;
}

.bookers-bet__picker-wrapper {
  position: relative;
  flex-shrink: 0;
}

.bookers-bet__picker-icon {
  font-size: 1.2rem;
  cursor: pointer;
}

.bookers-bet__picker-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Step labels */
.bookers-bet__step-label {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

/* Back button */
.bookers-bet__back-btn {
  font-size: 0.75rem;
  padding: 2px 0;
  border: none;
  background: none;
  color: #388ae5;
  cursor: pointer;
  margin-bottom: 4px;
  display: block;
}

.bookers-bet__back-btn:hover {
  text-decoration: underline;
}

/* Course buttons */
.bookers-bet__course-section {
  margin-top: 10px;
}

.bookers-bet__course-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bookers-bet__course-btn {
  font-size: 0.75rem;
  padding: 4px 12px;
  border: 1px solid #DBDEDF;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
}

.bookers-bet__course-btn--selected {
  background: #e0f7fa;
  border-color: #4cbdc5;
  color: #4cbdc5;
}

.bookers-bet__course-btn:hover {
  background: #e0f7f8;
  border-color: #4CBDC5;
}

/* Race buttons */
.bookers-bet__race-section {
  margin-top: 8px;
}

.bookers-bet__race-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bookers-bet__race-btn {
  font-size: 0.7rem;
  padding: 4px 8px;
  border: 1px solid #DBDEDF;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
}

.bookers-bet__race-btn--selected {
  background: #333;
  color: #fff;
  border-color: #333;
}

.bookers-bet__race-btn:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* Loading / Error */
.bookers-bet__loading {
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 0.9rem;
}

.bookers-bet__error {
  text-align: center;
  padding: 12px;
  color: #e53935;
  font-size: 0.85rem;
  margin-bottom: 12px;
}


/* Bet card — matches mybets-page design */
.bookers-bet__bet-card {
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.bookers-bet__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.bookers-bet__race-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.bookers-bet__card-body {
  padding: 8px 12px;
}

.bookers-bet__bet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.bookers-bet__bet-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.bookers-bet__bet-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #4cbdc5;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.bookers-bet__bet-str {
  font-family: monospace;
  font-size: 0.8rem;
  color: #333;
}

.bookers-bet__bet-cost {
  font-size: 0.75rem;
  color: #888;
}

.bookers-bet__bet-note {
  font-size: 0.75rem;
  color: #666;
  padding: 2px 0 6px 12px;
  border-left: 2px solid #4cbdc5;
  margin: 0 0 6px;
  line-height: 1.4;
}

/* 買い目メモの下（次の行との区切り線） */
.bookers-bet__bet-note + .bookers-bet__bet-row {
  border-top: 1px solid #f5f5f5;
  padding-top: 6px;
}

/* メモがない場合、買い目行同士の区切り線 */
.bookers-bet__bet-row + .bookers-bet__bet-row {
  border-top: 1px solid #f5f5f5;
}

.bookers-bet__comment-section {
  padding: 10px 12px;
  border-top: 1px solid #eee;
  background: #f9fffe;
}

.bookers-bet__comment-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4cbdc5;
  margin-bottom: 4px;
}

.bookers-bet__comment-text {
  font-size: 0.8rem;
  color: #333;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bookers-bet__bet-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bookers-bet__status-label {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.bookers-bet__status-hit {
  background: #fce2e2;
  color: #dc2626;
}

.bookers-bet__status-miss {
  background: #f5f5f5;
  color: #999;
}

.bookers-bet__win-amount {
  font-size: 0.8rem;
  font-weight: 700;
  color: #dc2626;
}

/* Card footer */
.bookers-bet__card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fafafa;
  border-top: 1px solid #eee;
}

.bookers-bet__cost-summary {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  gap: 2px;
  color: #333;
}

.bookers-bet__return-summary {
  font-weight: 700;
  color: #dc2626;
}

.bookers-bet__comment-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e0f7fa;
  color: #4cbdc5;
}

/* Summary */
.bookers-bet__summary {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 8px 0;
  font-size: 0.8rem;
  color: #333;
  font-weight: 600;
}

.bookers-bet__summary-return {
  color: #dc2626;
  font-weight: 700;
}

/* Empty / No bets */
.bookers-bet__empty,
.bookers-bet__no-bets {
  text-align: center;
  padding: 32px 16px;
  color: #999;
  font-size: 0.85rem;
}

/* Reset button */
.bookers-bet__reset-btn {
  display: block;
  margin: 12px auto 0;
  padding: 6px 20px;
  border: 1px solid #DBDEDF;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 0.8rem;
  cursor: pointer;
}

.bookers-bet__reset-btn:hover {
  background: #f5f5f5;
}

/* Placeholder (shown in editor while no data) */
.bookers-bet__placeholder {
  text-align: center;
  padding: 24px;
  color: #aaa;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px dashed #ddd;
  border-radius: 8px;
}

.bookers-bet__placeholder:hover {
  border-color: #bbb;
  color: #888;
}

/* ─── Modal overlay ─── */
.bookers-bet-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* PC: エディタ幅に合わせる */
.bookers-bet-modal__dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 682px;
  overflow: hidden;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* モバイル: 全画面 */
@media (max-width: 650px) {
  .bookers-bet-modal {
    align-items: stretch;
  }

  .bookers-bet-modal__dialog {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 12px;
  }
}

.bookers-bet-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bookers-bet-modal__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #333;
}

.bookers-bet-modal__close {
  border: none;
  background: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.bookers-bet-modal__close:hover {
  color: #333;
}

.bookers-bet-modal__content {
  /* Steps render inside here */
}

/* Insert button */
.bookers-bet__insert-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #4cbdc5;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.bookers-bet__insert-btn:hover {
  background: #3aa8b0;
}

/* Register button */
.bookers-bet__register-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #4cbdc5;
  border-radius: 8px;
  background: #fff;
  color: #4cbdc5;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.bookers-bet__register-btn:hover {
  background: #e0f7fa;
}
