/* ============================================================
   PICKUP PLAYERS — pickup.css
   Dugout Labs — add <link> in index.html or paste into main CSS
   Navy theme consistent with existing app
   ============================================================ */

/* ── Panel wrapper ──────────────────────────────────────────── */
.pickup-panel {
  background: #0f1e2e;
  border: 1px solid #1e3a5a;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.pickup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pickup-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pickup-icon {
  font-size: 18px;
}

.pickup-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}

.pickup-badge {
  background: #1d4ed8;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.pickup-empty {
  color: #64748b;
  font-size: 14px;
  text-align: center;
  padding: 16px 0 4px;
}

/* ── Add button ─────────────────────────────────────────────── */
.btn-pickup-add {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-pickup-add:hover { background: #2563eb; }

/* ── Cards ──────────────────────────────────────────────────── */
.pickup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pickup-card {
  background: #162032;
  border: 1px solid #1e3a5a;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pickup-card--expired {
  opacity: 0.55;
}

.pickup-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pickup-jersey {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #1e3a5a;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pickup-info {
  flex: 1;
  min-width: 0;
}

.pickup-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pickup-games-label {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.pickup-progress-bar {
  height: 4px;
  background: #1e3a5a;
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.pickup-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ── Card actions ───────────────────────────────────────────── */
.pickup-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pickup-remaining {
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
  min-width: 40px;
  text-align: right;
}

.pickup-remaining--critical {
  color: #ef4444;
}

.pickup-tag-expired {
  font-size: 11px;
  color: #475569;
  background: #1e293b;
  padding: 2px 8px;
  border-radius: 99px;
}

.btn-pickup-extend,
.btn-pickup-remove {
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-pickup-extend {
  background: #1e3a5a;
  color: #93c5fd;
}
.btn-pickup-extend:hover { background: #1d4ed8; color: #fff; }

.btn-pickup-remove {
  background: #1e293b;
  color: #f87171;
}
.btn-pickup-remove:hover { background: #7f1d1d; color: #fff; }

/* ── Expired toggle ─────────────────────────────────────────── */
.pickup-expired-section {
  margin-top: 12px;
}

.pickup-expired-toggle {
  background: none;
  border: none;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

/* ── Modals ─────────────────────────────────────────────────── */
.pickup-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pickup-modal {
  background: #0f1e2e;
  border: 1px solid #1e3a5a;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

.pickup-modal--sm {
  max-width: 360px;
}

.pickup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pickup-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}

.pickup-modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.pickup-modal-close:hover { color: #e2e8f0; }

/* ── Tab switcher ───────────────────────────────────────────── */
.pickup-tabs {
  display: flex;
  gap: 4px;
  background: #162032;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.pickup-tab-btn {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: all 0.15s;
}

.pickup-tab-btn--active {
  background: #1d4ed8;
  color: #fff;
}

/* ── Form elements ──────────────────────────────────────────── */
.pickup-form-group {
  margin-bottom: 16px;
}

.pickup-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pickup-form-group .required {
  color: #ef4444;
}

.pickup-input {
  width: 100%;
  background: #162032;
  border: 1px solid #1e3a5a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.pickup-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.pickup-input::placeholder { color: #475569; }

.pickup-input--short {
  max-width: 100px;
}

/* ── Stepper ────────────────────────────────────────────────── */
.pickup-form-group--limit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pickup-form-group--limit label {
  margin-bottom: 0;
  white-space: nowrap;
}

.pickup-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: #162032;
  border: 1px solid #1e3a5a;
  border-radius: 8px;
  overflow: hidden;
}

.pickup-stepper button {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.pickup-stepper button:hover { background: #1e3a5a; }

.pickup-stepper span {
  min-width: 32px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}

.pickup-limit-hint {
  font-size: 12px;
  color: #475569;
}

/* ── Search results ─────────────────────────────────────────── */
.pickup-search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.pickup-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #162032;
  border: 1px solid #1e3a5a;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.pickup-search-result:hover { background: #1e3a5a; }

.pickup-result-jersey {
  font-size: 12px;
  color: #64748b;
  min-width: 28px;
}

.pickup-result-name {
  flex: 1;
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 500;
}

.pickup-result-team {
  font-size: 12px;
  color: #475569;
}

.pickup-searching,
.pickup-no-results {
  color: #64748b;
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}

/* ── Selected player display ────────────────────────────────── */
.pickup-selected-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0d2137;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  font-size: 13px;
  color: #93c5fd;
  margin-top: 8px;
}

.pickup-selected-check {
  color: #22c55e;
  font-weight: 700;
}

.pickup-selected-player button {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  margin-left: auto;
}

/* ── Extend/Remove descriptors ──────────────────────────────── */
.pickup-extend-desc {
  font-size: 14px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.5;
}

.pickup-remove-note {
  font-size: 13px;
  color: #475569;
  margin: 0 0 20px;
}

/* ── Modal footer ───────────────────────────────────────────── */
.pickup-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.btn-pickup-cancel {
  background: #1e293b;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-pickup-cancel:hover { background: #293548; }

.btn-pickup-confirm {
  background: #1d4ed8;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-pickup-confirm:hover { background: #2563eb; }

.btn-pickup-danger {
  background: #991b1b;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-pickup-danger:hover { background: #b91c1c; }

/* ── Error display ──────────────────────────────────────────── */
.pickup-error {
  background: #3b0f0f;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 10px 14px;
  color: #f87171;
  font-size: 13px;
  margin-top: 12px;
}

.pickup-error-inline {
  color: #f87171;
  font-size: 13px;
  padding: 8px 0;
}

/* ============================================================
   PICKUP CODE SYSTEM — Add to pickup.css
   ============================================================ */

/* ── Search result code display ─────────────────────────────── */
.pickup-result-code {
  font-size: 11px;
  color: #475569;
  font-family: monospace;
  letter-spacing: 0.1em;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Code entry field in add modal ──────────────────────────── */
.pickup-code-entry {
  background: #0d2137;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  padding: 12px;
}

/* ── Sharing toggle switch ──────────────────────────────────── */
.pickup-share-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.pickup-share-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pickup-share-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #1e293b;
  border-radius: 99px;
  transition: 0.2s;
  border: 1px solid #334155;
}

.pickup-share-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #64748b;
  border-radius: 50%;
  transition: 0.2s;
}

.pickup-share-switch input:checked + .pickup-share-slider {
  background: #1d4ed8;
  border-color: #2563eb;
}

.pickup-share-switch input:checked + .pickup-share-slider:before {
  transform: translateX(22px);
  background: #fff;
}

/* ── Pickup code display card ────────────────────────────────── */
.pickup-code-display {
  background: #0a1929;
  border-radius: 10px;
  padding: 16px;
}

/* ── Toast ──────────────────────────────────────────────────── */
.pickup-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d4ed8;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  animation: pickup-toast-in 0.2s ease, pickup-toast-out 0.3s ease 2.7s forwards;
  pointer-events: none;
}

@keyframes pickup-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pickup-toast-out {
  to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .pickup-card { flex-wrap: wrap; }
  .pickup-card-actions { width: 100%; justify-content: flex-end; }
  .pickup-form-group--limit { flex-wrap: wrap; }
  .pickup-limit-hint { width: 100%; }
}