/* =========================================================
   PTK Lotto Stat Predictor - CSS ONLY HOTFIX
   SAFE MODE: แก้เฉพาะ CSS ไม่แตะ PHP / DB / API
========================================================= */

.ptk-lotto-wrap,
.ptk-lotto-admin {
  --ptk-gold: #c49a3d;
  --ptk-gold-soft: #f5d061;
  --ptk-dark: #15110a;
  --ptk-deep: #0f0b06;
  --ptk-card: rgba(24, 18, 10, .94);
  --ptk-card-2: rgba(35, 26, 14, .96);
  --ptk-line: rgba(196, 154, 61, .35);
  --ptk-text: #fff7df;
  --ptk-muted: #d9c690;
  --ptk-green: #1f8f4d;
  --ptk-red: #9a2b2b;
  font-family: inherit;
  color: var(--ptk-text);
}

.ptk-lotto-wrap *,
.ptk-lotto-admin * {
  box-sizing: border-box;
}

.ptk-lotto-head,
.ptk-lotto-admin-panel {
  background:
    radial-gradient(circle at top left, rgba(245, 208, 97, .18), transparent 34%),
    linear-gradient(135deg, #18130b 0%, #2b2112 100%);
  color: #fff7df;
  border: 1px solid rgba(196,154,61,.52);
  border-radius: 18px;
  padding: 18px;
  margin: 0 0 18px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}

.ptk-lotto-head h2,
.ptk-lotto-admin-panel h1,
.ptk-lotto-admin-panel h2,
.ptk-lotto-admin-panel h3 {
  color: #f7d987;
}

.ptk-lotto-head h2 {
  margin: 0 0 6px;
}

.ptk-lotto-head p,
.ptk-lotto-admin-panel p {
  margin: 0;
  color: #f4e8c6;
}

.ptk-lotto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.ptk-lotto-card,
.ptk-lotto-history,
.ptk-lotto-extra-wrap,
.ptk-lotto-extra-card {
  background:
    linear-gradient(180deg, rgba(39,29,15,.98), rgba(18,13,7,.98));
  color: var(--ptk-text);
  border: 1px solid var(--ptk-line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}

.ptk-lotto-card {
  padding: 15px;
}

.ptk-lotto-card h3,
.ptk-lotto-history h3,
.ptk-lotto-extra-head h3,
.ptk-lotto-extra-card h4 {
  color: #f5d061;
}

.ptk-lotto-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.ptk-lotto-rank-list {
  display: grid;
  gap: 10px;
}

.ptk-lotto-rank {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
  padding: 12px;
  border: 2px solid rgba(196,154,61,.35);
  background: rgba(255,255,255,.06);
  color: #fff7df;
}

.ptk-lotto-rank strong {
  font-size: 30px;
  letter-spacing: 2px;
  text-align: center;
  color: #fff3b0;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.ptk-rank-label {
  font-size: 12px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255,255,255,.10);
  color: #fff0c2;
  border: 1px solid rgba(255,255,255,.12);
}

.ptk-lotto-rank small {
  font-size: 12px;
  color: #d9c690;
}

.ptk-rank-1 {
  border-color: #f5d061;
  background: linear-gradient(135deg, rgba(245,208,97,.30), rgba(92,66,18,.42));
}

.ptk-rank-2 {
  border-color: #bfc7d2;
  background: linear-gradient(135deg, rgba(230,237,245,.22), rgba(72,80,90,.36));
}

.ptk-rank-3 {
  border-color: #c8874c;
  background: linear-gradient(135deg, rgba(200,135,76,.24), rgba(80,42,18,.38));
}

.ptk-lotto-history {
  margin-top: 20px;
  padding: 15px;
}

.ptk-lotto-history h3 {
  margin-top: 0;
}

.ptk-lotto-history-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(196,154,61,.22);
  background: rgba(255,255,255,.045);
  color: #f8eccb;
  margin: 8px 0;
}

.ptk-lotto-history-row.is-hit {
  border-color: rgba(62, 208, 117, .72);
  background: linear-gradient(135deg, rgba(31,143,77,.34), rgba(12,72,36,.38));
  color: #dfffe9;
  box-shadow: 0 0 0 1px rgba(62,208,117,.16) inset;
}

.ptk-lotto-history-row em {
  font-style: normal;
  font-weight: 700;
  color: #f5d061;
}

.ptk-lotto-history-row.is-hit em {
  color: #b8ffd0;
}

.ptk-lotto-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 213, 103, .12);
  border: 1px solid rgba(245, 208, 97, .36);
  color: #fff0c2;
}

.ptk-lotto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ptk-lotto-admin .ptk-lotto-grid {
  max-width: 1100px;
}

.ptk-lotto-admin-panel .button {
  margin-right: 4px;
}

.ptk-lotto-extra-wrap {
  margin: 10px 0 20px;
  padding: 15px;
}

.ptk-lotto-extra-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ptk-lotto-extra-head h3 {
  margin: 0;
  font-size: 18px;
}

.ptk-lotto-extra-head p {
  margin: 0;
  color: #d9c690;
  font-size: 13px;
}

.ptk-lotto-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ptk-lotto-extra-card {
  padding: 14px;
}

.ptk-lotto-extra-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.ptk-lotto-extra-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ptk-lotto-extra-item {
  display: grid;
  gap: 4px;
  text-align: center;
  border: 1px solid rgba(196,154,61,.38);
  border-radius: 14px;
  padding: 10px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(196,154,61,.10));
  color: #fff7df;
}

.ptk-lotto-extra-item span {
  font-size: 11px;
  color: #d8be76;
}

.ptk-lotto-extra-item strong {
  font-size: 24px;
  letter-spacing: 1px;
  color: #ffe58d;
  text-shadow: 0 2px 10px rgba(0,0,0,.32);
}

.ptk-lotto-extra-item small {
  font-size: 11px;
  color: #cbbd98;
}

.ptk-lotto-wrap table,
.ptk-lotto-admin table {
  background: rgba(20,15,8,.96);
  color: #fff7df;
  border-color: rgba(196,154,61,.28);
}

.ptk-lotto-wrap th,
.ptk-lotto-wrap td,
.ptk-lotto-admin th,
.ptk-lotto-admin td {
  color: #fff7df;
  border-color: rgba(196,154,61,.20);
}

.ptk-lotto-admin .widefat,
.ptk-lotto-admin .striped > tbody > :nth-child(odd),
.ptk-lotto-admin .striped > tbody > :nth-child(even) {
  background: #161007;
  color: #fff7df;
}

.ptk-lotto-admin .widefat th {
  background: #23190c;
  color: #f5d061;
}

@media (max-width: 900px) {
  .ptk-lotto-extra-grid {
    grid-template-columns: 1fr;
  }

  .ptk-lotto-extra-head {
    display: block;
  }

  .ptk-lotto-extra-head p {
    margin-top: 5px;
  }
}

@media (max-width: 640px) {
  .ptk-lotto-rank {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ptk-lotto-rank strong {
    font-size: 34px;
  }

  .ptk-lotto-grid {
    grid-template-columns: 1fr;
  }

  .ptk-lotto-extra-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ptk-lotto-extra-item strong {
    font-size: 28px;
  }
}

/* =========================================================
   PTK LOTTO ADMIN NOTICE FIX - v1.0.9
   Scope เฉพาะหน้า PTK Lotto เท่านั้น ไม่กระทบ wp-admin หน้าอื่น
========================================================= */
.ptk-lotto-admin .notice.notice-info,
.ptk-lotto-admin .notice.updated,
.ptk-lotto-admin .notice-success,
.ptk-lotto-admin .notice-error,
.ptk-lotto-admin .notice-warning {
  background: #161616 !important;
  color: #f5f5f5 !important;
  border-left: 4px solid #c89b3c !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.ptk-lotto-admin .notice.notice-info p,
.ptk-lotto-admin .notice.updated p,
.ptk-lotto-admin .notice-success p,
.ptk-lotto-admin .notice-error p,
.ptk-lotto-admin .notice-warning p {
  color: #f5f5f5 !important;
}

.ptk-lotto-admin .notice.notice-info strong,
.ptk-lotto-admin .notice.updated strong,
.ptk-lotto-admin .notice-success strong,
.ptk-lotto-admin .notice-error strong,
.ptk-lotto-admin .notice-warning strong {
  color: #f5d061 !important;
}

.ptk-lotto-admin .notice a {
  color: #f5d061 !important;
}

.ptk-lotto-admin .notice-dismiss:before {
  color: #ffffff !important;
}
