/* Modern confirm popup */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.open {
  display: flex;
}

.confirm-card {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: confirmIn 0.2s ease forwards;
  display: flex;
  flex-direction: column;
}

.confirm-card.confirm-card-lg {
  max-width: 720px;
}

/* inscribe popup: a bit wider to fit the whole week table */
.confirm-card.confirm-card-inscribe {
  max-width: 860px;
}

/* section divider + title inside a popup */
.popup-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 20px 0 16px;
}

.popup-section-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@keyframes confirmIn {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.confirm-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #4a4a4a;
}

.confirm-close {
  font-size: 16px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.confirm-close:hover {
  color: #333;
}

.confirm-body {
  padding: 22px 20px;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
  overflow-y: auto;
  flex: 1;
}

.confirm-footer {
  display: flex;
  justify-content: flex-end;
  column-gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.confirm-btn {
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.confirm-btn:focus {
  outline: none;
}

.confirm-btn-cancel {
  background-color: #e8e8e8;
  color: #444;
}

.confirm-btn-cancel:hover {
  background-color: #ddd;
}

.confirm-btn-accept {
  background-color: var(--errorColor);
  color: white;
}

.confirm-btn-accept:hover {
  background-color: #c00;
}

/* settle (pay difference) - company color */
.confirm-btn-settle {
  background-color: var(--color1);
  color: white;
}

.confirm-btn-settle:hover {
  background-color: var(--color5);
}

/* refund (return money) - green */
.confirm-btn-refund {
  background-color: var(--okColor);
  color: white;
}

.confirm-btn-refund:hover {
  background-color: #1e6b1e;
}

/* inscription options (course variants with radio) */
.inscription-options {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.inscription-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.inscription-option:hover {
  border-color: var(--color2);
  background-color: var(--color3);
}

.inscription-option.selected {
  border-color: var(--color1);
  background-color: var(--color3);
}

.inscription-option-text {
  font-size: 13px;
  color: #333;
}

.inscription-option input[type="radio"] {
  cursor: pointer;
  accent-color: var(--color1);
  flex-shrink: 0;
}

/* cursada grid (attendance date inputs) */
.attendance-grid {
  margin-top: 6px;
}

.attendance-grid-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.attendance-grid-table th {
  font-size: 11px;
  font-weight: 600;
  color: #4a4a4a;
  text-align: center;
  padding: 4px 2px;
  border: 1px solid #e0e0e0;
  background-color: #f7f7f7;
}

.attendance-grid-table td {
  border: 1px solid #e0e0e0;
  padding: 0;
}

.attendance-grid-input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  padding: 6px 1px;
  font-size: 11px;
  text-align: center;
  color: #333;
  background-color: white;
}

/* format hint next to the "Cursada" label */
.attendance-grid-hint {
  font-weight: 400;
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* inscribe popup: attendance shifts as a week table (day header + M/T + checkbox) */
.isc-table-scroll {
  overflow-x: auto;
}

.isc-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.isc-table th,
.isc-table td {
  border: 1px solid #e0e0e0;
  text-align: center;
}

.isc-table th.isc-day {
  background-color: var(--color3);
  color: var(--color1);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 4px;
  white-space: nowrap;
}

.isc-table th.isc-shift {
  font-size: 11px;
  font-weight: 600;
  color: #777;
  padding: 4px 2px;
}

.isc-table td.isc-check {
  padding: 8px 2px;
}

.isc-table td.isc-check input {
  cursor: pointer;
  accent-color: var(--color1);
}

.inscribe-shifts-empty {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

/* left-align the course options error (looks off centered when no courses show) */
#inscribeOptionsError {
  text-align: left;
}

.attendance-grid-input:focus {
  outline: none;
  background-color: var(--color3);
}

/* a shift already attended: locked (greyed out, not editable) */
.attendance-grid-input-locked,
.attendance-grid-input:disabled {
  background-color: #ededed;
  color: #999;
  cursor: not-allowed;
}

.attendance-grid-input.invalid-input {
  background-color: #fdeaea;
  border: none !important;
  color: var(--errorColor);
}

/* LP inscription (types O/A/R with category checkboxes) */
.lp-section {
  margin-bottom: 14px;
}

.lp-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color1);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.lp-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-cat {
  display: inline-flex;
  align-items: center;
  column-gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: border-color 0.15s, background-color 0.15s;
  user-select: none;
}

.lp-cat:hover {
  border-color: var(--color2);
}

.lp-cat.selected-cat {
  border-color: var(--color1);
  background-color: var(--color3);
  color: var(--color1);
  font-weight: 500;
}

.lp-cat input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--color1);
  pointer-events: none;
}

/* exams info popup */
.exams-info-student {
  font-size: 14px;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 14px;
}

.exam-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin-bottom: 10px;
}

.exam-info-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  min-width: 44px;
}

.exam-info-statuses {
  display: flex;
  flex-direction: column;
  row-gap: 4px;
  align-items: flex-end;
}

.exam-info-status {
  display: flex;
  align-items: center;
  column-gap: 8px;
  font-size: 12.5px;
  color: #555;
}

.exam-info-status .exam-info-kind {
  color: #888;
  min-width: 62px;
  text-align: right;
}

/* status badge colors */
.exam-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.exam-status-passed   { background-color: #e6f9e6; color: #2e7d32; }
.exam-status-failed   { background-color: #fce8e8; color: #c62828; }
.exam-status-pending  { background-color: #fff3e0; color: #e08600; }
.exam-status-none     { background-color: #f0f0f0; color: #777; }

.exams-info-empty {
  font-size: 13px;
  color: #777;
  text-align: center;
  padding: 12px;
}

/* edit blocked popup */
.edit-blocked-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 14px;
  padding: 28px 24px 22px;
}

.edit-blocked-icon {
  font-size: 40px;
  color: var(--alertColor);
}

.edit-blocked-text {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

/* informative talks popup: wider card so the action buttons don't wrap */
.confirm-card.talks-card {
  max-width: 560px;
}

.talks-copy,
.talks-link {
  white-space: nowrap;
}

/* informative talks popup: list of talks with their links */
.talks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.talks-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--color6);
  border-radius: var(--radius, 8px);
  background-color: var(--color3);
}

.talks-day {
  font-size: 14px;
  font-weight: 500;
  color: #4a4a4a;
}

.talks-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.talks-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color1);
  background-color: #fff;
  border: 1px solid var(--color1);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
}

.talks-copy:hover {
  background-color: var(--color3);
}

.talks-copy:focus {
  outline: none;
}

.talks-copy.talks-copied {
  color: var(--okColor);
  border-color: var(--okColor);
}

.talks-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background-color: var(--color1);
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  transition: var(--transition, all 0.2s ease);
}

.talks-link:hover {
  background-color: var(--color4);
}

.talks-link:focus {
  outline: none;
}

/* credentials popup rows */
.credentials-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--color6);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.credentials-row:last-child {
  margin-bottom: 0;
}

.credentials-label {
  font-size: 13px;
  font-weight: 600;
  color: #777;
}

.credentials-value {
  font-size: 14px;
  color: var(--color1);
  font-weight: 500;
  word-break: break-all;
  text-align: right;
}
