/* =========================================================
   WooCommerce Students — front-end styles
   ========================================================= */

/* =========================================================
   FORM — Add / Edit Student
   ========================================================= */

.wcs-form {
  --gap: 16px;
  --section-radius: 12px;
  --accent: #1a6eb5;
  --accent-light: #f0f7ff;
  --border: #e5e7eb;
  --text-muted: #6b7280;
  max-width: 860px;
}

/* Required note */
.wcs-required-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Required asterisk */
.wcs-required {
  color: #c0003c;
  text-decoration: none;
  border: none;
  font-style: normal;
  margin-left: 2px;
}

/* ---- Section cards ---- */
.wcs-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--section-radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  margin-bottom: 20px;
  overflow: hidden;
}

/* Section header bar */
.wcs-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--border);
}

/* Step number bubble */
.wcs-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

/* Section title — reset ALL theme overrides */
.wcs-section-header .wcs-h2 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  border: none !important;
  float: none !important;
  flex: 1;
}

/* "Optional" pill */
.wcs-section-optional {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: #eff0f2;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Section body — padding around the fields */
.wcs-section-body {
  padding: 20px;
}

/* ---- Grid layout ---- */
.wcs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.wcs-grid-2:last-child { margin-bottom: 0; }
.wcs-span-2  { grid-column: 1 / -1; }

/* ---- Fields ---- */
.wcs-field {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.wcs-field > span {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

/* ---- Inputs, selects, textareas ---- */
.wcs-field input[type="text"],
.wcs-field input[type="email"],
.wcs-field input[type="number"],
.wcs-field input[type="date"],
.wcs-field select,
.wcs-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto;
  outline: none;
}
.wcs-field input:focus,
.wcs-field select:focus,
.wcs-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,110,181,.12);
}
.wcs-field textarea { resize: vertical; min-height: 90px; }

/* ---- Checkboxes (agreements) ---- */
.wcs-type-checkbox             { flex-direction: row; align-items: flex-start; gap: 10px; }
.wcs-type-checkbox > span      { font-weight: 400; font-size: 14px; color: #374151; order: 2; margin: 0; padding-top: 1px; }
.wcs-type-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- Agreements section body override ---- */
.wcs-section-agreements .wcs-section-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wcs-agreements a { color: var(--accent); font-weight: 500; }

/* ---- Copy-address button — layout + state only (base style from custom-btn) ---- */
.wcs-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: inherit;
}
.wcs-btn-copy .wcs-copy-arrow { font-size: 14px; line-height: 1; }
.wcs-btn-copied { opacity: 0.75; }

/* Copied field flash */
@keyframes wcs-copied-flash {
  0%   { background-color: #d4edff; }
  100% { background-color: transparent; }
}
.wcs-field-copied { animation: wcs-copied-flash 1.2s ease-out; }

/* ---- Submit ---- */
.wcs-submit { margin-top: 8px; }

/* =========================================================
   Manage Students — card grid
   ========================================================= */

.wcs-students-list { max-width: 900px; }

/* Header row */
.wcs-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.wcs-list-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  border: none !important;
  float: none !important;
}

.wcs-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--accent, #1a6eb5);
  color: #fff !important;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.wcs-btn-add:hover { background: #145590; }

/* Empty state */
.wcs-list-empty {
  text-align: center;
  padding: 48px 24px;
  background: #f9f9f9;
  border: 1px dashed #ddd;
  border-radius: 10px;
}
.wcs-list-empty p { margin-bottom: 16px; color: #666; }

/* Card grid */
.wcs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Individual card */
.wcs-student-card-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow 0.15s;
}
.wcs-student-card-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }

/* Card top: avatar + identity */
.wcs-card-top { display: flex; align-items: center; gap: 12px; }
.wcs-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a6eb5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.wcs-card-identity { min-width: 0; }
.wcs-card-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wcs-card-school {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card meta */
.wcs-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.wcs-meta-item { display: flex; flex-direction: column; }
.wcs-meta-item dt { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #888; font-weight: 600; }
.wcs-meta-item dd { font-size: 13px; font-weight: 600; color: #222; margin: 2px 0 0; }

/* Card actions */
.wcs-card-actions { display: flex; gap: 8px; margin-top: auto; }
.wcs-card-edit,
.wcs-card-delete {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  background: none;
}
.wcs-card-edit        { background: #f0f7ff; color: #1a6eb5; border-color: #a8cfee; }
.wcs-card-edit:hover  { background: #daeeff; }
.wcs-card-delete      { background: #fff0f2; color: #b00020; border-color: #f5b8c0; }
.wcs-card-delete:hover { background: #fde0e4; }
.wcs-delete-student   { margin: 0; flex: 1; display: flex; }
.wcs-delete-student .wcs-card-delete { width: 100%; }

/* =========================================================
   PDP student picker
   ========================================================= */
.wcs-student-picker { border: 1px solid #e6e6e6; border-radius: 12px; padding: 12px; margin: 12px 0; }
.wcs-student-list   { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.wcs-student-card   { display: flex; align-items: center; gap: 10px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; cursor: pointer; }
.wcs-student-card input[type=radio] { margin-right: 6px; }
.wcs-inline-note    { font-size: 18px; opacity: .85; }
.wcs-add-link       { margin-top: 8px; }

/* Generic utility buttons (kept for any remaining usage) */
.wcs-btn       { display: inline-block; border: 1px solid #ddd; padding: 6px 12px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.wcs-btn-ghost { background: transparent; }
