/* DCM Calendar Styles */
.dcm-calendar {
  --dcm-primary: #1e3a5f;
  --dcm-primary-light: #2c5282;
  --dcm-accent: #c6a227;
  --dcm-bg: #f7fafc;
  --dcm-border: #e2e8f0;
  max-width: 960px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
}

/* Larger calendar: [dcm_calendar size="large"] */
.dcm-calendar--large {
  max-width: 1200px;
}

.dcm-calendar--large .dcm-calendar-title {
  font-size: 1.75rem;
}

.dcm-calendar--large .dcm-days {
  min-height: 520px;
}

.dcm-calendar--large .dcm-day-cell {
  min-height: 90px;
  padding: 0.35rem;
}

.dcm-calendar--large .dcm-day-num {
  font-size: 1rem;
}

.dcm-calendar--large .dcm-event-btn {
  padding: 6px 8px;
  font-size: 0.8rem;
}

/* Full width: [dcm_calendar size="full"] */
.dcm-calendar--full {
  max-width: none;
  width: 100%;
}

.dcm-calendar--full .dcm-days {
  min-height: 560px;
}

.dcm-calendar--full .dcm-day-cell {
  min-height: 95px;
}

/* Optional smaller: [dcm_calendar size="medium"] / size="small" */
.dcm-calendar--medium {
  max-width: 880px;
}

.dcm-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.dcm-calendar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dcm-primary);
  margin: 0;
}

.dcm-nav {
  background: var(--dcm-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.dcm-nav:hover {
  background: var(--dcm-primary-light);
}

.dcm-nav:focus {
  outline: 2px solid var(--dcm-accent);
  outline-offset: 2px;
}

.dcm-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dcm-primary);
}

.dcm-weekday {
  text-align: center;
  padding: 0.5rem;
}

.dcm-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  min-height: 460px;
  min-width: 0;
}

.dcm-day-cell {
  background: var(--dcm-bg);
  border: 1px solid var(--dcm-border);
  border-radius: 4px;
  padding: 0.3rem;
  min-height: 78px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.dcm-day-cell.dcm-empty {
  background: #edf2f7;
  border-color: transparent;
}

.dcm-day-cell.dcm-has-events {
  background: #fff;
  border-color: var(--dcm-accent);
}

.dcm-day-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.dcm-event-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  margin-top: 2px;
  font-size: 0.7rem;
  text-align: left;
  background: var(--dcm-primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.dcm-event-btn:hover {
  background: var(--dcm-primary-light);
}

.dcm-event-btn--practice {
  background: #2f855a;
}

.dcm-event-btn--practice:hover {
  background: #276749;
}

.dcm-modal-practice-kind {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2f855a;
}

.dcm-modal-practice-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #4a5568;
}

.dcm-loading {
  text-align: center;
  padding: 2rem;
  color: #718096;
  display: none;
}

.dcm-error {
  padding: 1rem;
  color: #c53030;
  text-align: center;
}

/* Modal */
.dcm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dcm-modal[hidden] {
  display: none;
}

.dcm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.dcm-modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dcm-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
  line-height: 1;
  padding: 0.25rem;
}

.dcm-modal-close:hover {
  color: #2d3748;
}

#dcm-modal-body {
  padding: 1.5rem;
}

.dcm-modal-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--dcm-primary);
}

.dcm-modal-meta p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.dcm-modal-desc {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #4a5568;
}

.dcm-register-form label {
  display: block;
  margin-bottom: 0.5rem;
}

.dcm-register-form input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--dcm-border);
  border-radius: 4px;
  font-size: 1rem;
}

.dcm-register-form p {
  margin: 1rem 0;
}

.dcm-accept-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
}

.dcm-accept-terms input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.dcm-accept-terms-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

.dcm-accept-terms a {
  text-decoration: underline;
  color: var(--dcm-primary, #1e3a5f);
}

.dcm-accept-terms a:hover {
  text-decoration: underline;
}

.dcm-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.dcm-btn-primary {
  background: var(--dcm-primary);
  color: #fff;
  border: none;
}

.dcm-btn-primary:hover:not(:disabled) {
  background: var(--dcm-primary-light);
}

.dcm-submit-btn {
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.dcm-btn-outline {
  background: transparent;
  color: var(--dcm-primary);
  border: 2px solid var(--dcm-primary);
}

.dcm-btn-outline:hover {
  background: var(--dcm-bg);
}

.dcm-attendees-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dcm-border);
}

.dcm-attendees-heading {
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--dcm-primary);
}

.dcm-attendees-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  max-height: 200px;
  overflow-y: auto;
}

.dcm-no-attendees {
  color: #718096;
  font-style: italic;
  margin: 0.5rem 0 1rem;
}

.dcm-loading-inline {
  margin: 1rem 0;
  color: #718096;
}

.dcm-register-closed {
  color: #e53e3e;
  font-weight: 600;
}

/* Upcoming events cards */
.dcm-upcoming-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.dcm-event-card {
  border: 1px solid var(--dcm-border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: #fff;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dcm-event-card-single {
  max-width: 380px;
}

.dcm-event-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--dcm-primary);
}

.dcm-event-meta {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.dcm-event-spots {
  font-weight: 600;
}

.dcm-event-desc {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #4a5568;
}
