/* Carolls Personal - basic styles */
.cpd-wrap .cpd-grid {}

.cpd-table-wrap {
  overflow-x: auto;
}

table.cpd-grid {
  width: 100%;
  border-collapse: collapse;
}

table.cpd-grid th,
table.cpd-grid td {
  text-align: center;
  white-space: nowrap;
  padding: 8px;
  vertical-align: middle;
}

table.cpd-grid th:first-child,
table.cpd-grid td:first-child {
  text-align: left;
  white-space: normal;
  width: 260px;
}

table.cpd-grid th:last-child,
table.cpd-grid td:last-child {
  width: 120px;
}

.cpd-yes {
  background: #d6ffd6;
}

.cpd-no {
  background: #ffd6d6;
}

.cpd-evt-title {
  font-weight: 600;
  white-space: normal;
}

.cpd-evt-date {
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}

.cpd-sum {
  font-weight: 700;
  background: #eef6ff;
}

/* Frontend box */
.cpd-box {
  max-width: 900px;
  margin: 24px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}

.cpd-box h2 {
  margin-top: 0;
}

.cpd-box form {
  display: grid;
  gap: 12px;
}

.cpd-box label {
  font-weight: 600;
}

.cpd-box input[type="password"],
.cpd-box input[type="text"],
.cpd-box select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #bbb;
  width: 100%;
  color: #000 !important;
}

select {
  color: #000 !important;
}

.cpd-box button,
.cpd-actions button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #242424;
  color: #fff;
  cursor: pointer;
}

.cpd-error {
  color: #b00020;
}

.cpd-note {
  color: #555;
  font-size: 13px;
}

.cpd-notice-success {
  background: #e6ffef;
  border: 1px solid #81d69b;
  color: #0b6b2e;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.cpd-form .cpd-grid1 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.cpd-events {
  margin-top: 12px;
}

.cpd-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.cpd-event-card {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.cpd-event-card input[type="checkbox"] {
  display: none;
}

.cpd-event-card .cpd-event-title {
  font-weight: 700;
}

.cpd-event-card .cpd-event-date {
  font-size: 12px;
  color: #666;
}

/* custom checkbox */
.cpd-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cpd-check {
  width: 20px;
  height: 20px;
  border: 2px solid #888;
  border-radius: 6px;
  display: inline-block;
}

.cpd-event-card:has(.cpd-checkbox:checked) .cpd-check {
  border-color: #24ccb2;
  box-shadow: inset 0 0 0 9999px rgba(36, 204, 178, 0.35);
}

.cpd-event-card:focus-within {
  outline: 2px solid #24ccb2;
  outline-offset: 2px;
}

.cpd-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cpd-actions .button-link {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #999;
  color: #222;
}

/* Legend */
.cpd-legend {
  margin: 6px 0 10px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.cpd-legend .leg {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #333;
}

.cpd-legend .leg-yes::before,
.cpd-legend .leg-no::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.cpd-legend .leg-yes::before {
  background: #d6ffd6;
  border: 1px solid #8bc48b;
}

.cpd-legend .leg-no::before {
  background: #ffd6d6;
  border: 1px solid #c48b8b;
}

@media (max-width: 700px) {
  .cpd-form .cpd-grid1 {
    grid-template-columns: 1fr;
  }
}