@charset "UTF-8";

.golf-bet-page {
  max-width: 1200px;
}

.golf-bet-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =========================
   공통 박스
========================= */

.bet-setting-box,
.bet-table-area,
.bet-result-area {
  min-width: 0;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fbfcfe;
  overflow: hidden;
}

.bet-setting-title h2,
.bet-table-head h2,
.bet-result-title h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  color: #111827;
}

.bet-setting-title p,
.bet-table-head p,
.bet-result-title p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #6b7280;
}

/* =========================
   내기 설정
========================= */

.bet-setting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.bet-player-panel,
.bet-money-panel {
  min-width: 0;
}

.bet-money-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.bet-name-input {
  min-height: 162px;
  resize: vertical;
}

.bet-field-help {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.bet-option-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.bet-option-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr);
  gap: 12px;
  min-width: 0;
}

.bet-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 104px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
}

.bet-option-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #111827;
  flex-shrink: 0;
  margin-top: 2px;
}

.bet-option-card span {
  display: block;
  min-width: 0;
}

.bet-option-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  color: #111827;
  line-height: 1.4;
  word-break: keep-all;
}

.bet-option-card small {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: #6b7280;
  word-break: keep-all;
}

.bet-option-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bet-option-field .utility-input {
  min-width: 0;
}

.bet-btn-row {
  margin-top: 22px;
  align-items: center;
}

.bet-message {
  margin: 14px 0 0;
  min-height: 22px;
  font-size: 14px;
  color: #4b5563;
}

.bet-message.is-success {
  color: #166534;
  font-weight: 700;
}

.bet-message.is-error {
  color: #b91c1c;
  font-weight: 700;
}

/* =========================
   홀별 스코어 입력
========================= */

.bet-table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.bet-table-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.bet-table-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.bet-table-guide strong {
  margin-right: 4px;
  font-size: 13px;
  color: #111827;
  font-weight: 900;
}

.bet-table-guide span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

/* 테이블이 사이드바 밖으로 밀리지 않게 보정 */
.bet-table-area {
  overflow: hidden;
}

.bet-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.bet-score-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.bet-score-table th,
.bet-score-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #edf1f5;
  border-right: 1px solid #edf1f5;
  font-size: 12px;
  text-align: center;
  color: #374151;
  vertical-align: middle;
  white-space: nowrap;
}

.bet-score-table th {
  background: #f8fafc;
  color: #111827;
  font-weight: 900;
}

.bet-score-table th:first-child,
.bet-score-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  text-align: left;
  font-weight: 900;
  color: #111827;
  background: #ffffff;
}

.bet-score-table th:first-child {
  z-index: 3;
  background: #f8fafc;
}

.bet-score-table th:nth-last-child(2),
.bet-score-table td:nth-last-child(2),
.bet-score-table th:last-child,
.bet-score-table td:last-child {
  width: 72px;
  min-width: 72px;
  font-weight: 900;
}

.bet-score-table tr:last-child td {
  border-bottom: none;
}

.bet-score-table th:last-child,
.bet-score-table td:last-child {
  border-right: none;
}

.bet-empty {
  padding: 28px !important;
  text-align: center !important;
  color: #6b7280 !important;
  font-weight: 600 !important;
}

.bet-total-cell {
  font-size: 14px !important;
  font-weight: 900 !important;
  color: #111827 !important;
}

/* 홀 헤더 + PAR 입력 */
.hole-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 48px;
}

.hole-head strong {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
}

.hole-head label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: #6b7280;
  font-weight: 700;
}

.hole-head input {
  width: 30px;
  height: 24px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.hole-head input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.06);
}

/* 스코어 입력: 숫자칸 + 우측 ▲▼ */
.score-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 58px;
}

.score-stepper .bet-score-input {
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  color: #111827;
  outline: none;
}

.score-stepper .bet-score-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.score-spin-buttons {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.score-step-btn {
  width: 20px;
  height: 15px;
  padding: 0;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #475569;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.score-up-btn {
  border-radius: 7px 7px 4px 4px;
}

.score-down-btn {
  border-radius: 4px 4px 7px 7px;
}

.score-step-btn:hover {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.score-stepper .bet-score-input::-webkit-outer-spin-button,
.score-stepper .bet-score-input::-webkit-inner-spin-button,
.hole-head input::-webkit-outer-spin-button,
.hole-head input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-stepper .bet-score-input,
.hole-head input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.bet-score-note {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.bet-score-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #6b7280;
}

/* =========================
   결과 영역
========================= */

.bet-result-area {
  background: #ffffff;
}

.bet-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.bet-result-box {
  min-width: 0;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fbfcfe;
}

.bet-result-box h3 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 900;
  color: #111827;
}

.bet-result-content {
  font-size: 14px;
  line-height: 1.8;
  color: #475569;
}

.bet-result-list {
  margin: 0;
  padding-left: 18px;
}

.bet-result-list li + li {
  margin-top: 6px;
}

.bet-plus {
  color: #166534 !important;
  font-weight: 900;
}

.bet-minus {
  color: #b91c1c !important;
  font-weight: 900;
}

.bet-zero {
  color: #6b7280 !important;
  font-weight: 800;
}

/* =========================
   반응형
========================= */

@media (max-width: 1100px) {
  .bet-setting-layout {
    grid-template-columns: 1fr;
  }

  .bet-option-panel {
    grid-template-columns: 1fr;
  }

  .bet-option-group {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr);
  }
}

@media (max-width: 1024px) {
  .bet-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .golf-bet-card {
    padding: 18px;
  }

  .bet-setting-box,
  .bet-table-area,
  .bet-result-area,
  .bet-result-box {
    padding: 20px;
    border-radius: 20px;
  }

  .bet-option-group {
    grid-template-columns: 1fr;
  }

  .bet-option-field {
    min-height: auto;
  }

  .bet-btn-row .utility-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .bet-table-head {
    flex-direction: column;
  }

  .bet-score-table th,
  .bet-score-table td {
    padding: 7px 5px;
  }

  .bet-score-table th:first-child,
  .bet-score-table td:first-child {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
  }

  .hole-head {
    width: 44px;
  }

  .score-stepper {
    width: 54px;
  }
}

@media (max-width: 480px) {
  .bet-btn-row .utility-btn {
    flex: 1 1 100%;
  }
}