@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

.rcm-cal {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #eef0ff;
  color: #1e2245;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  font-size: 12.5px;
}
.rcm-cal *, .rcm-cal *::before, .rcm-cal *::after { box-sizing: border-box; }

/* ---- header ---- */
.rcm-cal-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.rcm-cal-title { font-size: 1.4rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.rcm-cal-sub   { margin: 0.2rem 0 0; color: #8b91b8; font-size: 0.8rem; font-weight: 500; }

/* ---- FullCalendar overrides ---- */
#rcm-cal-mount {
  background: white; border: 1px solid #ebedf8;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(30,34,69,0.03), 0 4px 14px rgba(99,102,241,0.07);
  padding: 0.9rem 0.95rem;
}
.rcm-cal .fc { font-family: inherit; font-size: 0.85rem; }
.rcm-cal .fc .fc-toolbar-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: #1e2245; }
.rcm-cal .fc .fc-button {
  background: white; color: #3b3f6b;
  border: 1px solid #ebedf8;
  border-radius: 999px;
  padding: 0.35rem 0.9rem; font-size: 0.74rem; font-weight: 600;
  text-transform: none; box-shadow: none;
}
.rcm-cal .fc .fc-button:hover, .rcm-cal .fc .fc-button-primary:not(:disabled):active,
.rcm-cal .fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #6366f1; color: white; border-color: #6366f1;
}
.rcm-cal .fc .fc-button:focus { box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
.rcm-cal .fc .fc-button-group .fc-button { border-radius: 0; }
.rcm-cal .fc .fc-button-group .fc-button:first-child { border-radius: 999px 0 0 999px; }
.rcm-cal .fc .fc-button-group .fc-button:last-child  { border-radius: 0 999px 999px 0; }
.rcm-cal .fc-theme-standard td, .rcm-cal .fc-theme-standard th { border-color: #f3f4fc; }
.rcm-cal .fc .fc-col-header-cell-cushion { color: #8b91b8; font-weight: 700; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.5rem 0.25rem; }
.rcm-cal .fc .fc-daygrid-day-number  { font-size: 0.75rem; font-weight: 600; color: #1e2245; padding: 0.4rem 0.5rem; }
.rcm-cal .fc .fc-day-today { background: #eef0ff !important; }
.rcm-cal .fc .fc-event {
  border-radius: 6px; padding: 0.1rem 0.4rem; font-size: 0.7rem; font-weight: 600;
  border: none; cursor: pointer;
}
/* Pending PTO requests: dashed outline, no fill — easy to spot vs approved. */
.rcm-cal .fc .fc-event.rcm-cal-event-pending {
  border: 1px dashed currentColor !important;
  background: transparent !important;
  font-style: italic;
}
/* Office-closed events: bold, dark, can't-miss. */
.rcm-cal .fc .fc-event.rcm-cal-event-closure {
  background: repeating-linear-gradient(
    45deg,
    #1f2937 0px, #1f2937 6px,
    #374151 6px, #374151 12px
  ) !important;
  color: white !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none !important;
}
.rcm-cal .fc-event-title { padding: 0.04rem 0; }

/* ---- modals ---- */
.rcm-cal-modal {
  display: none; position: fixed; inset: 0; z-index: 999999;
  background: rgba(15,17,42,0.55);
  align-items: flex-start; justify-content: center;
  padding: 4rem 1rem; overflow-y: auto;
}
.rcm-cal-modal.is-open { display: flex; }
.rcm-cal-modal-dialog {
  position: relative; background: white; color: #1e2245;
  border-radius: 16px; width: 100%; max-width: 480px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  font-family: 'Poppins', sans-serif;
}
.rcm-cal-modal-close {
  position: absolute; top: 0.55rem; right: 0.7rem;
  background: transparent; border: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: #8b91b8;
}
.rcm-cal-modal-close:hover { color: #1e2245; }

.rcm-cal-detail-tag {
  display: inline-block; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.12rem 0.55rem; border-radius: 999px; margin-bottom: 0.5rem;
}
.rcm-cal-modal-dialog h3 { margin: 0 0 0.35rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.rcm-cal-detail-when { margin: 0 0 0.6rem; color: #8b91b8; font-size: 0.78rem; font-weight: 500; }
.rcm-cal-detail-desc { margin: 0; font-size: 0.86rem; color: #3b3f6b; }
.rcm-cal-detail-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 1rem; padding-top: 0.7rem; border-top: 1px solid #ebedf8; }

.rcm-cal-field { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.65rem; }
.rcm-cal-field label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8b91b8; font-weight: 700; }
.rcm-cal-field input, .rcm-cal-field select, .rcm-cal-field textarea {
  width: 100%; padding: 0.5rem 0.7rem; font-family: inherit; font-size: 0.85rem;
  border: 1px solid #ebedf8; border-radius: 8px; background: #f8f9fe;
  color: #1e2245;
}
.rcm-cal-field input:focus, .rcm-cal-field select:focus, .rcm-cal-field textarea:focus {
  outline: none; border-color: #6366f1; background: white;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.rcm-cal-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.rcm-cal-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid #ebedf8; }

.rcm-cal .rcm-btn, .rcm-cal-modal .rcm-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; font-weight: 600;
  font-size: 0.78rem; line-height: 1.2; font-family: inherit;
  text-decoration: none; transition: all 0.18s ease;
  background: transparent; color: inherit;
}
/* Orange gradient primary — scoped so it doesn't override other dashboards. */
.rcm-cal .rcm-btn-primary, .rcm-cal-modal .rcm-btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white; border-color: transparent;
  box-shadow: 0 4px 12px rgba(249,115,22,0.30);
}
.rcm-cal .rcm-btn-primary:hover, .rcm-cal-modal .rcm-btn-primary:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-1px); color: white;
}
.rcm-cal .rcm-btn-outline, .rcm-cal-modal .rcm-btn-outline {
  background: white; color: #1e2245; border-color: #ebedf8;
}
.rcm-cal .rcm-btn-outline:hover, .rcm-cal-modal .rcm-btn-outline:hover {
  border-color: #ea580c; color: #ea580c;
}
.rcm-cal .rcm-btn-ghost, .rcm-cal-modal .rcm-btn-ghost {
  background: transparent; color: #ea580c;
}
.rcm-cal .rcm-btn-ghost:hover, .rcm-cal-modal .rcm-btn-ghost:hover {
  background: #fff1e6;
}
.rcm-cal .rcm-btn-danger, .rcm-cal-modal .rcm-btn-danger {
  background: transparent; color: #b91c1c; border-color: #fecaca;
}
.rcm-cal .rcm-btn-danger:hover, .rcm-cal-modal .rcm-btn-danger:hover {
  background: #fee2e2;
}
