/* Water Polo Match Sheet Plugin Styles */

#wpms-root * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#wpms-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
  color: #1a1a1a;
}

/* Lock screen */
#wpms-lock-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem 1rem;
}

.wpms-lock-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.wpms-lock-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.wpms-lock-sub {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.wpms-lock-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 10px;
  outline: none;
}

.wpms-lock-card input[type="password"]:focus {
  border-color: #185FA5;
}

#wpms-password-error {
  font-size: 13px;
  color: #c0392b;
  min-height: 18px;
  margin-bottom: 8px;
}

#wpms-password-btn {
  width: 100%;
  padding: 12px;
  background: #185FA5;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

#wpms-password-btn:active { transform: scale(0.98); }

/* Nav */
#wpms-app {
  padding: 1rem;
}

.wpms-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.wpms-nav-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  text-align: center;
}

.wpms-nav-btn.wpms-nav-active {
  background: #185FA5;
  border-color: #185FA5;
  color: #fff;
}

.wpms-nav-btn:active { transform: scale(0.97); }

/* Screens */
.wpms-screen { display: none; }
.wpms-screen.wpms-screen-active { display: block; }

/* Scoreboard */
.wpms-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.wpms-team-name-btn {
  flex: 1;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  text-align: center;
}

.wpms-team-name-btn:active { transform: scale(0.97); }
.wpms-spacer { width: 36px; }

.wpms-scores-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.wpms-score {
  flex: 1;
  font-size: 72px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  line-height: 1;
}

.wpms-vs {
  width: 36px;
  font-size: 20px;
  font-weight: 500;
  color: #888;
  text-align: center;
}

.wpms-shot-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: #1D9E75;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-align: center;
  margin-bottom: 12px;
}

.wpms-shot-btn:active { transform: scale(0.98); }

/* Shot panel */
.wpms-panel {
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.wpms-panel-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.wpms-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 12px 0;
}

.wpms-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wpms-time-part { flex: 1; }

.wpms-time-part label {
  font-size: 11px;
  color: #666;
  display: block;
  margin-bottom: 4px;
}

.wpms-time-val-btn {
  width: 100%;
  padding: 11px 0;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  text-align: center;
}

.wpms-time-val-btn:active { transform: scale(0.97); }

.wpms-time-sep {
  font-size: 26px;
  color: #888;
  padding-top: 16px;
}

.wpms-picker-wrap {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.wpms-picker-wrap.wpms-picker-open { display: flex; }

.wpms-pick-btn {
  width: 40px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
}

.wpms-pick-btn.wpms-sel {
  background: #1D9E75;
  border-color: #1D9E75;
  color: #fff;
}

.wpms-pick-btn:active { transform: scale(0.95); }

.wpms-btn-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wpms-btn-grid button {
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  min-width: 44px;
  text-align: center;
}

.wpms-btn-grid button.wpms-sel {
  background: #185FA5;
  border-color: #185FA5;
  color: #fff;
}

.wpms-btn-grid button:active { transform: scale(0.97); }

.wpms-outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wpms-outcome-btn {
  padding: 13px 8px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  text-align: center;
}

.wpms-outcome-btn:active { transform: scale(0.97); }
.wpms-goal  { background: #1D9E75 !important; border-color: #1D9E75 !important; color: #fff !important; }
.wpms-save  { background: #185FA5 !important; border-color: #185FA5 !important; color: #fff !important; }
.wpms-block { background: #BA7517 !important; border-color: #BA7517 !important; color: #fff !important; }
.wpms-miss  { background: #fdecea !important; border-color: #f5c6c6 !important; color: #c0392b !important; }

.wpms-summary-line {
  font-size: 13px;
  color: #666;
  min-height: 18px;
  margin-top: 10px;
}

.wpms-confirm-btn {
  width: 100%;
  padding: 12px;
  background: #1D9E75;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
}

.wpms-confirm-btn:active { transform: scale(0.98); }

.wpms-cancel-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  margin-top: 8px;
  padding: 6px;
}

/* Roster */
.wpms-roster-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.wpms-rtab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  text-align: center;
}

.wpms-rtab.wpms-rtab-active {
  background: #185FA5;
  border-color: #185FA5;
  color: #fff;
}

.wpms-rtab:active { transform: scale(0.97); }

.wpms-section-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

#wpms-root textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #f8f8f8;
  font-size: 13px;
  color: #1a1a1a;
  font-family: inherit;
  resize: none;
}

.wpms-paste-btn {
  width: 100%;
  padding: 11px;
  background: #185FA5;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  margin-top: 8px;
}

.wpms-paste-btn:active { transform: scale(0.98); }

.wpms-player-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #eee;
}

.wpms-player-assign-name {
  flex: 1;
  font-size: 13px;
  color: #1a1a1a;
}

.wpms-num-select {
  width: 64px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #f8f8f8;
  font-size: 13px;
  color: #1a1a1a;
  font-family: inherit;
}

.wpms-action-btn {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  margin-top: 8px;
  text-align: center;
}

.wpms-action-btn:active { transform: scale(0.98); }
.wpms-action-btn.wpms-primary { background: #185FA5; border-color: #185FA5; color: #fff; }

/* Code box */
.wpms-code-box {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  font-family: monospace;
  color: #1a1a1a;
  word-break: break-all;
  margin: 8px 0;
}

/* Log */
.wpms-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.wpms-log-table th {
  text-align: left;
  color: #666;
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
  font-size: 11px;
}

.wpms-log-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
  vertical-align: middle;
}

.wpms-log-table tr:last-child td { border-bottom: none; }
.wpms-col-time  { width: 36px; }
.wpms-col-num   { width: 32px; }
.wpms-col-event { width: 50px; }
.wpms-col-name  { width: auto; }
.wpms-col-score { width: 44px; text-align: right; }

.wpms-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.wpms-badge-goal  { background: #E1F5EE; color: #085041; }
.wpms-badge-save  { background: #E6F1FB; color: #0C447C; }
.wpms-badge-block { background: #FAEEDA; color: #633806; }
.wpms-badge-miss  { background: #fdecea; color: #c0392b; }

.wpms-empty-state {
  text-align: center;
  color: #888;
  font-size: 13px;
  padding: 24px 0;
}
