/* Walk team assignments */
.walk-team-modal-card {
  width: min(920px, 95vw);
}

.walk-team-role-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.walk-team-role-grid label small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-weight: 800;
}

.walk-team-picker {
  padding: 16px;
  border: 1px solid rgba(15,127,85,.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(15,127,85,.09), transparent 34%),
    #fff;
}

.walk-team-list {
  display: grid;
  gap: 9px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
  margin-top: 12px;
}

.walk-team-user-row {
  display: grid;
  grid-template-columns: 20px 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.walk-team-user-row.is-selected {
  border-color: rgba(15,127,85,.28);
  background: #ecfdf3;
}

.walk-team-user-row.is-reserved {
  opacity: .72;
  background: #f8fafc;
}

.walk-team-user-row input {
  width: 18px;
  height: 18px;
  accent-color: #0f7f55;
}

.walk-team-user-row .avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #ecfdf3;
  color: #0f7f55;
  font-weight: 1000;
}

.walk-team-user-row strong,
.walk-team-user-row small {
  display: block;
}

.walk-team-user-row small {
  color: #64748b;
  margin-top: 2px;
  font-weight: 750;
}

.walk-team-current {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
}

.walk-team-current > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.walk-team-current span {
  color: #64748b;
  font-weight: 900;
}

.walk-team-current strong {
  color: #0f172a;
}

.pill-team {
  background: #eef2ff !important;
  color: #3730a3 !important;
  border: 1px solid rgba(79,70,229,.16) !important;
}

.walk-team-btn {
  border-color: rgba(79,70,229,.18) !important;
}

@media (max-width: 760px) {
  .walk-team-role-grid,
  .walk-team-current > div {
    grid-template-columns: 1fr;
  }

  .walk-team-picker .section-head {
    display: grid;
    gap: 10px;
  }

  .walk-team-picker .inline-controls {
    display: grid;
  }
}


.walk-team-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff, #fff);
  color: #1e3a8a;
  font-weight: 1000;
  border: 1px solid rgba(59,130,246,.16);
  margin-bottom: 14px;
}

.walk-team-loading[hidden] {
  display: none !important;
}

.walk-team-loading .spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(59,130,246,.22);
  border-top-color: #2563eb;
  animation: pyrk-spin .75s linear infinite;
}

@keyframes pyrk-spin {
  to { transform: rotate(360deg); }
}

.walk-team-user-row.is-readonly {
  cursor: default;
  opacity: .82;
}

.walk-team-user-row.is-readonly input {
  cursor: not-allowed;
}

.walk-team-modal-card .notice.bad {
  border: 1px solid rgba(220,38,38,.20);
  background: #fff1f2;
  color: #991b1b;
  border-radius: 16px;
  padding: 12px;
  font-weight: 900;
}

.walk-team-modal-card .notice.ok {
  border: 1px solid rgba(15,127,85,.20);
  background: #ecfdf3;
  color: #14532d;
  border-radius: 16px;
  padding: 12px;
  font-weight: 900;
}


/* HARD FIX: Team editor is inline, not a modal, so scrolling never stops */
.walk-team-inline-panel {
  margin: -8px 0 18px;
  padding: 18px;
  border: 1px solid rgba(79,70,229,.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(79,70,229,.10), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 22px 58px rgba(15,23,42,.10);
}

.walk-team-inline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.walk-team-inline-head h3 {
  margin: 3px 0 4px;
  color: #0f172a;
  font-size: 1.35rem;
}

.walk-team-inline-body {
  display: grid;
  gap: 14px;
}

.walk-team-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.walk-team-inline-panel .notice.bad {
  border: 1px solid rgba(220,38,38,.20);
  background: #fff1f2;
  color: #991b1b;
  border-radius: 16px;
  padding: 12px;
  font-weight: 900;
}

.walk-team-inline-panel .notice.ok {
  border: 1px solid rgba(15,127,85,.20);
  background: #ecfdf3;
  color: #14532d;
  border-radius: 16px;
  padding: 12px;
  font-weight: 900;
}

body.modal-open:has(.walk-team-inline-panel) {
  overflow: auto !important;
}

@media (max-width: 760px) {
  .walk-team-inline-head {
    display: grid;
  }

  .walk-team-actions {
    display: grid;
  }

  .walk-team-actions .btn {
    width: 100%;
  }
}


/* Searchable route + searchable manager/head walker */
.route-search-field,
.team-search-field {
  position: relative;
  display: grid;
  gap: 7px;
}

.route-search-field input[type="text"],
.team-search-field input[type="text"] {
  width: 100%;
}

.pro-search-dropdown {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  display: grid;
  gap: 6px;
  max-height: 310px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}

.pro-search-dropdown[hidden] {
  display: none !important;
}

.pro-search-option {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.pro-search-option:hover,
.pro-search-option.is-selected {
  border-color: rgba(15,127,85,.24);
  background: #ecfdf3;
}

.pro-search-option strong,
.pro-search-option small {
  display: block;
}

.pro-search-option small {
  color: #64748b;
  font-weight: 800;
}

.pro-search-empty {
  padding: 12px;
  margin: 0;
}

.team-search-dropdown {
  top: calc(100% - 18px);
}

.walk-team-role-grid {
  overflow: visible;
}

.schedule-panel,
.walk-team-inline-panel {
  overflow: visible;
}


.team-search-field::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 38px;
  color: #64748b;
  font-weight: 1000;
  pointer-events: none;
}

.team-search-field input[type="text"] {
  padding-right: 34px;
  cursor: pointer;
}

.team-search-field input[type="text"]:focus {
  border-color: rgba(15,127,85,.45) !important;
  box-shadow: 0 0 0 4px rgba(15,127,85,.10) !important;
}


.field-hint {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.walk-date-picker-popup {
  position: absolute;
  z-index: 1000;
  padding: 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15,23,42,.22);
}

.walk-date-picker-popup[hidden] {
  display: none !important;
}

.walk-date-picker-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.walk-date-picker-head strong {
  text-align: center;
  color: #0f172a;
  font-size: 1rem;
}

.walk-date-picker-week,
.walk-date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.walk-date-picker-week span {
  text-align: center;
  font-size: .72rem;
  font-weight: 1000;
  color: #64748b;
  padding: 5px 0;
}

.walk-date-picker-grid button {
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  min-height: 36px;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.walk-date-picker-grid button:hover {
  background: #ecfdf3;
  border-color: rgba(15,127,85,.20);
}

.walk-date-picker-grid button.is-muted {
  color: #94a3b8;
  background: #f8fafc;
}

.walk-date-picker-grid button.is-today {
  border-color: rgba(79,70,229,.35);
  color: #3730a3;
}

.walk-date-picker-grid button.is-selected {
  background: #0f7f55;
  color: #fff;
}

.walk-date-picker-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.team-search-dropdown {
  z-index: 90;
}

.team-search-field input[type="text"] {
  background: #fff;
}


/* Admin Walks final date rule: visible dd/mm/yyyy + custom calendar popup */
#walkDateInput,
#registrationDeadlineInput,
#votingDeadlineInput {
  background:
    linear-gradient(90deg, #fff, #fff),
    linear-gradient(135deg, rgba(15,127,85,.12), rgba(79,70,229,.10));
  cursor: pointer;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.walk-date-picker-popup {
  position: absolute;
  z-index: 999999;
  padding: 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15,23,42,.22);
}

.walk-date-picker-popup[hidden] {
  display: none !important;
}

.walk-date-picker-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.walk-date-picker-head strong {
  text-align: center;
  color: #0f172a;
  font-size: 1rem;
}

.walk-date-picker-week,
.walk-date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.walk-date-picker-week span {
  text-align: center;
  font-size: .72rem;
  font-weight: 1000;
  color: #64748b;
  padding: 5px 0;
}

.walk-date-picker-grid button {
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  min-height: 36px;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.walk-date-picker-grid button:hover {
  background: #ecfdf3;
  border-color: rgba(15,127,85,.20);
}

.walk-date-picker-grid button.is-muted {
  color: #94a3b8;
  background: #f8fafc;
}

.walk-date-picker-grid button.is-today {
  border-color: rgba(79,70,229,.35);
  color: #3730a3;
}

.walk-date-picker-grid button.is-selected {
  background: #0f7f55;
  color: #fff;
}

.walk-date-picker-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}


.walk-empty-state {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px dashed rgba(15,127,85,.24);
  border-radius: 22px;
  background: #f8fffb;
}

.walk-empty-state strong {
  font-size: 1.05rem;
}
