/* WP Educ Schedule 1.1.2 — full-width transparent toolbar with left/right alignment */

.wpeduc-toolbar.centered.one-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1rem;
  background: transparent;
  padding: 0.5rem 0;
  box-shadow: none;
  border: none;
}

.wpeduc-date-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.today-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wpeduc-date-form input[type="date"] {
  padding: 0.45rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}

.wpeduc-date-form .btn-primary {
  background: #2097FC;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.wpeduc-date-form .btn-primary:hover {
  background: #167fe0;
}

.wpeduc-date-form .btn-today {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: #2097FC;
  text-decoration: none;
  color: #fff;
}

.today-check input,
.today-check select {
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.today-check button {
  padding: 0.45rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #2097FC;
  cursor: pointer;
  color: #fff;
}

.today-result {
  margin-top: 0.75rem;
}

.today-result.ok {
  background: #e8fff2;
  border: 1px solid #c6f6d5;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
}

.today-result.none {
  background: #ffe8e8;
  border: 1px solid #feb2b2;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
}

.slot-header {
  position: static;
  background: transparent;
  color: #111827;
  padding: 0.25rem 0;
  margin: 1.1rem 0 0.4rem;
  border-bottom: 2px solid #d1d5db;
  border-top: none;
  border-radius: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: none;
}

.slot-list {
  display: block;
}

.slot-list .course-card {
  width: 100%;
  margin-bottom: 0.35rem;
}

.course-card {
  border: 1px solid #e5e7eb;
  border-left: 6px solid var(--accent, #6b7280);
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  background: #fff;
  box-shadow: none;
}

.course-card.no-students {
  background: #ffdede;
  border-color: #ff9b9b;
}

.course-card header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.course-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.badge.stock {
  background: #eefbf2;
}

.students {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f7f7f9;
  border: 1px solid #eee;
}


/* 1.1.3 — vertical alignment + uniform control sizes + empty-state banner */
.wpeduc-toolbar.centered.one-row {
  align-items: center;
}

.wpeduc-toolbar.centered.one-row .wpeduc-date-form,
.wpeduc-toolbar.centered.one-row .today-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wpeduc-toolbar.centered.one-row input[type="date"],
.wpeduc-toolbar.centered.one-row input[type="search"],
.wpeduc-toolbar.centered.one-row select,
.wpeduc-toolbar.centered.one-row button,
.wpeduc-toolbar.centered.one-row .btn-today {
  height: 38px;
  line-height: 38px;
  /* for anchors, buttons */
  font-size: 15px;
  box-sizing: border-box;
}

/* Ensure anchors look like buttons and align text vertically */
.wpeduc-toolbar.centered.one-row .btn-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Normalize padding for inputs/buttons */
.wpeduc-toolbar.centered.one-row input[type="date"],
.wpeduc-toolbar.centered.one-row input[type="search"],
.wpeduc-toolbar.centered.one-row select {
  padding: 0 12px;
}

.wpeduc-toolbar.centered.one-row button,
.wpeduc-toolbar.centered.one-row .btn-today {
  padding: 0 14px;
}

/* Empty-state banner: centered, bigger text, red background */
.wpeduc-empty {
  background: #ff4d4d1a;
  /* translucent red */
  border: 2px solid #ff4d4d;
  color: #7a0b0b;
  text-align: center;
  padding: 16px 18px;
  margin: 12px auto;
  font-size: 1.25rem;
  font-weight: 800;
  width: 100%;
}


/* 1.1.4 — fix search icon overlap, enforce vertical alignment, uniform sizes */
.wpeduc-toolbar.centered.one-row {
  align-items: center;
}

.wpeduc-toolbar.centered.one-row form.wpeduc-date-form {
  margin: 0;
}

.wpeduc-toolbar.centered.one-row .today-check {
  margin: 0;
}

/* Remove browser search icons and ensure padding */
.wpeduc-toolbar.centered.one-row input[type="search"] {
  -webkit-appearance: none;
  background: none !important;
  padding-left: 12px;
}

/* Also hide built-in clear X on WebKit if needed */
.wpeduc-toolbar.centered.one-row input[type="search"]::-webkit-search-decoration,
.wpeduc-toolbar.centered.one-row input[type="search"]::-webkit-search-cancel-button,
.wpeduc-toolbar.centered.one-row input[type="search"]::-webkit-search-results-button,
.wpeduc-toolbar.centered.one-row input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

.wpeduc-toolbar.centered.one-row input[type="date"],
.wpeduc-toolbar.centered.one-row input[type="search"],
.wpeduc-toolbar.centered.one-row select,
.wpeduc-toolbar.centered.one-row button,
.wpeduc-toolbar.centered.one-row .btn-today {
  height: 40px;
  font-size: 15px;
  box-sizing: border-box;
}

.wpeduc-toolbar.centered.one-row button,
.wpeduc-toolbar.centered.one-row .btn-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 14px;
}

.wpeduc-toolbar.centered.one-row input[type="date"],
.wpeduc-toolbar.centered.one-row input[type="search"],
.wpeduc-toolbar.centered.one-row select {
  padding: 0 12px;
  line-height: normal;
}

.wpeduc-date-form .btn-today:hover {
  background: #167fe0;
}

.today-check button:hover {
  background: #167fe0;
}

/* 1.1.6 — 'Azi' and 'Caută' default white/black, hover blue */
.wpeduc-toolbar.centered.one-row .btn-today,
.wpeduc-toolbar.centered.one-row .today-check button {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #ccc !important;
}

.wpeduc-toolbar.centered.one-row .btn-today:hover,
.wpeduc-toolbar.centered.one-row .today-check button:hover {
  background: #2097FC !important;
  color: #fff !important;
  border-color: #2097FC !important;
}

/* Keep primary button blue */
.wpeduc-toolbar.centered.one-row .btn-primary {
  background: #2097FC;
  color: #fff;
  border: none;
}

.wpeduc-toolbar.centered.one-row .btn-primary:hover {
  background: #167fe0;
}

/* --- Modal (admin only) --- */
.wpeduc-modal[hidden] {
  display: none !important;
}

.wpeduc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.wpeduc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.wpeduc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 92vw);
  margin: 8vh auto 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.wpeduc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.wpeduc-modal__body {
  padding: 14px;
  line-height: 1.5;
}

.wpeduc-modal__row {
  margin: 6px 0;
}

.wpeduc-modal__footer {
  padding: 12px 14px;
  border-top: 1px solid #eee;
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
}

.wpeduc-modal__close {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: #333;
}

.btn {
  display: inline-block;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.btn-primary {
  background: #2097FC;
  color: #fff;
  border-color: #2097FC;
}

.btn-secondary {
  background: #fff;
  color: #111 !important;
  border-color: #ccc;
}

.btn-primary:hover {
  background: #167fe0;
  border-color: #167fe0;
}

.btn-secondary:hover {
  background: #2097FC;
  color: #fff;
  border-color: #2097FC;
}

/* Make admin student chips look interactive */
.student-chip.admin {
  cursor: pointer;
  border-color: #ccc;
  background: #f9fafb;
}

.student-chip.admin:hover {
  background: #eef2ff;
}

/* v1.4.7: Outline button for "Adaugă restanță" in course meta */
.btn.btn-outline,
.add-restanta-btn {
  background: #fff;
  color: #000;
  border: 1px solid #2097FC;
  border-radius: 8px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 28px;
  cursor: pointer;
}

.btn.btn-outline:hover,
.add-restanta-btn:hover {
  background: #2097FC;
  color: #fff;
  border-color: #2097FC;
}

/* ensure meta row wraps nicely with the new button */
.meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* v2.0.3 — Modal breathing room & date row */
.wpeduc-modal__dialog {
  width: min(820px, 96vw);
  max-height: 86vh;
}

.wpeduc-modal__body {
  padding: 18px 20px;
}

.wpeduc-section {
  margin-bottom: 16px;
}

.wpeduc-field {
  margin-bottom: 14px;
  position: relative;
}

.wpeduc-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.wpeduc-field input[type="search"],
.wpeduc-field input[type="text"] {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  line-height: 22px;
}

.wpeduc-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 8px 0 0;
}

.wpeduc-check input {
  width: 18px;
  height: 18px;
}

/* summary */
.wpeduc-summary {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
}

/* bottom infobar for date */
.wpeduc-infobar {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

/* suggestions */
.wpeduc-suggest {
  position: absolute;
  z-index: 10001;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
  margin-top: 6px;
  max-height: 260px;
  overflow: auto;
  min-width: 320px;
}

.wpeduc-suggest .item {
  padding: 10px 12px;
  cursor: pointer;
}

.wpeduc-suggest .item:hover {
  background: #f1f5f9;
}

/* overlay host fixes (if not already present) */
body.wpeduc-modal-open {
  overflow: hidden;
}

#wpeduc-modal-host {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

#wpeduc-modal-host>.wpeduc-modal {
  pointer-events: auto;
}