/**
 * winsight.jp 親ページ埋め込み用（index.html と同じ見た目 + Discover 用追加分）
 */
:root {
  --border: #e0e0e0;
  --text: #222;
  --muted: #666;
  --accent: #1a5fb4;
  --highlight: #fff9c4;
}

.okuti-widget {
  box-sizing: border-box;
  font-family: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
  -webkit-text-size-adjust: 100%;
  padding: 8px;
}

.okuti-widget *,
.okuti-widget *::before,
.okuti-widget *::after {
  box-sizing: border-box;
}

.okuti-widget .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.okuti-widget .modes {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.okuti-widget .modes button {
  border: none;
  background: #fff;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}

.okuti-widget .modes button + button {
  border-left: 1px solid var(--border);
}

.okuti-widget .modes button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.okuti-widget .auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.okuti-widget .auto-refresh input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.okuti-widget .meta {
  font-size: 11px;
  color: var(--muted);
  width: 100%;
}

.okuti-widget .wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.okuti-widget table {
  border-collapse: collapse;
  width: 100%;
  min-width: 280px;
}

.okuti-widget th,
.okuti-widget td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.okuti-widget th {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  background: #f5f5f5;
  white-space: nowrap;
}

.okuti-widget tr:last-child td {
  border-bottom: none;
}

.okuti-widget .time {
  white-space: nowrap;
  width: 4.5rem;
}

.okuti-widget th.amount,
.okuti-widget td.amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.okuti-widget .type {
  white-space: nowrap;
  min-width: 3rem;
}

.okuti-widget td.type.type-fukusho {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 600;
}

.okuti-widget .venue,
.okuti-widget .race {
  max-width: 5.5rem;
  word-break: break-all;
  font-size: 12px;
  color: var(--muted);
}

.okuti-widget a.horse {
  color: var(--accent);
  text-decoration: none;
}

.okuti-widget a.horse:hover {
  text-decoration: underline;
}

.okuti-widget .by-horse .group {
  margin-bottom: 16px;
}

.okuti-widget .by-horse .group-title {
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  background: #eef3f9;
  border-bottom: 1px solid var(--border);
}

.okuti-widget .empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.okuti-widget tr.okuti-row-new td {
  animation: okuti-highlight-fade 2.5s ease-out;
}

@keyframes okuti-highlight-fade {
  0% {
    background-color: var(--highlight);
  }
  100% {
    background-color: transparent;
  }
}

.okuti-widget .okuti-status-error {
  font-size: 12px;
  color: #b3261e;
  margin-bottom: 8px;
}

.okuti-meeting-section {
  margin-bottom: 20px;
}

.okuti-meeting-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 480px) {
  .okuti-widget th,
  .okuti-widget td {
    padding: 8px 10px;
    font-size: 13px;
  }
}
