/* ── WND Public Styles ─────────────────────────────────────
   Inherits Kadence CSS custom properties where available.
   ────────────────────────────────────────────────────────── */

/* ── Schedule table ─────────────────────────────────────── */

.wnd-schedule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: none;
  margin: 1.5em 0;
}

.wnd-schedule-table th,
.wnd-schedule-table td {
  padding: 0.5rem 0.5rem;
  text-align: left;
  border: none;
  color: var(--global-palette4, #1a202c);
  vertical-align: top;
}

.wnd-schedule-table th {
  font-weight: 700;
  padding-bottom: 0.75rem;
}

.wnd-schedule-table td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.wnd-schedule-table th:nth-child(1),
.wnd-schedule-table td:nth-child(1) {
  width: 18%;
  white-space: nowrap;
  padding-left: 0;
  padding-right: 1.5rem;
}

.wnd-schedule-table th:nth-child(2),
.wnd-schedule-table td:nth-child(2) {
  width: 40%;
  padding-right: 1.5rem;
}

.wnd-schedule-table th:nth-child(3),
.wnd-schedule-table td:nth-child(3) {
  width: 14%;
  padding-right: 1.5rem;
}

.wnd-schedule-table th:nth-child(4),
.wnd-schedule-table td:nth-child(4) {
  width: 28%;
  white-space: nowrap;
}

.wnd-needs-cover {
  background: #fffbeb;
}

.wnd-badge {
  display: inline-block;
  font-size: 0.7em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.5em;
  font-weight: 600;
}

.wnd-badge--cover {
  background: #fbbf24;
  color: #78350f;
}

/* ── Dashboard intro ───────────────────────────────────── */

.wnd-dashboard-intro {
  color: #4a5568;
  margin-bottom: 0.5em;
}

/* ── List layout ───────────────────────────────────────── */

.wnd-list {
  list-style: none;
  padding: 0;
  margin: 1.25em 0;
}

.wnd-list-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 0.65em;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.wnd-list-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wnd-list-item--unclaimed {
  border-left: 4px solid #a0aec0;
}

.wnd-list-item--claimed {
  border-left: 4px solid #48bb78;
}

.wnd-list-item--needs_cover {
  border-left: 4px solid #ecc94b;
}

.wnd-list-item--cancelled {
  border-left: 4px solid #fc8181;
  opacity: 0.6;
}

.wnd-list-row {
  display: flex;
  align-items: center;
  gap: 0.85em;
  padding: 0.85em 1.15em;
  flex-wrap: wrap;
}

.wnd-list-date {
  font-weight: 700;
  font-size: 0.95em;
  color: #1a202c;
  white-space: nowrap;
  min-width: 7em;
}

.wnd-list-status {
  display: inline-block;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
}

.wnd-list-status--unclaimed {
  background: #e2e8f0;
  color: #718096;
}

.wnd-list-status--claimed {
  background: #c6f6d5;
  color: #276749;
}

.wnd-list-status--needs_cover {
  background: #fefcbf;
  color: #975a16;
}

.wnd-list-meta {
  font-size: 0.88em;
  color: #4a5568;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wnd-list-time {
  font-size: 0.85em;
  color: #718096;
  white-space: nowrap;
}

.wnd-list-actions {
  display: flex;
  gap: 0.4em;
  flex-shrink: 0;
}

.wnd-waiting {
  font-size: 0.85em;
  color: #b7791f;
  font-style: italic;
}

/* ── Inline form ───────────────────────────────────────── */

.wnd-inline-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 1.15em;
}

.wnd-inline-form--open {
  max-height: 500px;
  padding: 0 1.15em 1em;
  border-top: 1px solid #e2e8f0;
}

.wnd-inline-actions {
  display: flex;
  gap: 0.6em;
  margin-top: 0.5em;
}

/* ── Buttons ─────────────────────────────────────────────── */

.wnd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 1.3em;
  border: none;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.wnd-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.wnd-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.wnd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wnd-btn--primary {
  background: var(--global-palette1, #2b6cb0);
  color: #fff;
}

.wnd-btn--primary:hover {
  background: var(--global-palette2, #2c5282);
}

.wnd-btn--secondary {
  background: #edf2f7;
  color: #2d3748;
}

.wnd-btn--secondary:hover {
  background: #e2e8f0;
}

.wnd-btn--warning {
  background: #fefcbf;
  color: #744210;
  border: 1px solid #ecc94b;
}

.wnd-btn--warning:hover {
  background: #faf089;
}

.wnd-btn--sm {
  padding: 0.35em 0.85em;
  font-size: 0.8em;
  border-radius: 6px;
}

/* ── Autocomplete ────────────────────────────────────────── */

.wnd-autocomplete-wrap {
  position: relative;
}

.wnd-autocomplete-wrap input {
  width: 100%;
  padding: 0.6em 0.85em;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.95em;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wnd-autocomplete-wrap input:focus {
  outline: none;
  border-color: var(--global-palette1, #2b6cb0);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.wnd-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cbd5e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wnd-autocomplete-item {
  padding: 0.6em 0.85em;
  cursor: pointer;
  transition: background 0.1s;
}

.wnd-autocomplete-item:hover {
  background: #ebf4ff;
}

.wnd-autocomplete-address {
  display: block;
  font-size: 0.8em;
  color: #718096;
  margin-top: 0.15em;
}

/* ── Notices ─────────────────────────────────────────────── */

.wnd-notice {
  padding: 0.75em 1em;
  border-radius: 8px;
  margin: 0.75em 0;
  font-size: 0.9em;
  font-weight: 500;
  animation: wnd-slide-up 0.2s ease;
}

.wnd-notice--success {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  color: #276749;
}

.wnd-notice--error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #9b2c2c;
}

.wnd-notice--warning {
  background: #fffff0;
  border: 1px solid #fefcbf;
  color: #744210;
}

.wnd-notice--info {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  color: #2a4365;
}

/* ── Form elements ──────────────────────────────────────── */

.wnd-form-group {
  margin-bottom: 1em;
}

.wnd-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85em;
  color: #4a5568;
  margin-bottom: 0.35em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wnd-form-group textarea,
.wnd-form-group input[type="text"] {
  width: 100%;
  padding: 0.6em 0.85em;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.95em;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

.wnd-form-group textarea:focus,
.wnd-form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--global-palette1, #2b6cb0);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

/* ── Time stepper ───────────────────────────────────────── */

.wnd-time-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wnd-time-stepper:focus-within {
  border-color: var(--global-palette1, #2b6cb0);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.wnd-time-stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  border: none;
  background: #f7fafc;
  color: #4a5568;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.1s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}

.wnd-time-stepper__btn:hover {
  background: #edf2f7;
  color: #1a202c;
}

.wnd-time-stepper__btn:active {
  background: #e2e8f0;
}

.wnd-time-stepper__input {
  border: none;
  outline: none;
  text-align: center;
  font-size: 0.95em;
  font-family: inherit;
  width: 5.5em;
  padding: 0.45em 0;
  background: transparent;
}

.wnd-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.wnd-form-row {
  display: flex;
  gap: 1em;
}

.wnd-form-group--half {
  flex: 1;
}

/* ── Host Apply ──────────────────────────────────────────── */

.wnd-requirements {
  background: #f7fafc;
  padding: 1em 1.5em;
  border-radius: 10px;
  margin-bottom: 1.5em;
  border: 1px solid #e2e8f0;
}

.wnd-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0;
}

.wnd-requirements li {
  padding: 0.35em 0;
}

.wnd-req-check {
  display: inline-block;
  width: 1.5em;
  text-align: center;
  font-weight: 700;
  margin-right: 0.25em;
}

.wnd-req-check--pass {
  color: #48bb78;
}

.wnd-req-check--fail {
  color: #fc8181;
}

.wnd-req-check--info {
  color: #a0aec0;
}

/* ── Loading ─────────────────────────────────────────────── */

.wnd-loading {
  text-align: center;
  padding: 3em 2em;
  color: #a0aec0;
  font-size: 0.95em;
}

.wnd-loading::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--global-palette1, #2b6cb0);
  border-radius: 50%;
  margin: 0 auto 0.75em;
  animation: wnd-spin 0.6s linear infinite;
}

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

@keyframes wnd-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .wnd-schedule-table thead {
    display: none;
  }

  .wnd-schedule-table tr {
    display: block;
    padding: 0.6em 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .wnd-schedule-table tr:last-child {
    border-bottom: none;
  }

  .wnd-schedule-table td {
    display: flex;
    justify-content: space-between;
    padding: 0.15em 0;
  }

  .wnd-schedule-table td::before {
    content: attr(data-label);
    font-weight: 700;
    margin-right: 1em;
  }

  .wnd-list-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35em;
  }

  .wnd-list-meta {
    white-space: normal;
  }

  .wnd-list-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .wnd-form-row {
    flex-direction: column;
    gap: 0;
  }
}
