.demo-calendar-page {
  padding: 1rem 0 2rem;
}

.demo-calendar-title {
  margin-bottom: 0.75rem;
}

.demo-calendar-title .section-title {
  font-size: clamp(1.8rem, 2.8vw, 2.35rem);
}

.demo-calendar-title .section-subtitle {
  font-size: 1rem;
}

[data-theme="dark"] .demo-calendar-title .section-title {
  color: #f8fafc;
}

[data-theme="dark"] .demo-calendar-title .section-subtitle {
  color: #94a3b8;
}

.calendar-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.demo-calendar-page .calendar-container {
  max-width: 1180px;
  min-height: 780px;
  padding: 18px;
  background-color: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.09);
}

.demo-calendar-page .calendar-header {
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 14px;
}

.calendar-nav-button {
  width: 40px;
  height: 40px;
  padding: 0;
}

.calendar-view-toggle .btn {
  min-width: 76px;
}

.demo-calendar-page .calendar-view-toggle .btn-outline-primary {
  color: #059669;
  border-color: #059669;
}

.demo-calendar-page .calendar-view-toggle .btn-outline-primary:hover,
.demo-calendar-page .calendar-view-toggle .btn-outline-primary.active {
  color: #fff;
  background-color: #059669;
  border-color: #059669;
}

.demo-calendar-page .spinner-border.text-primary {
  color: #059669 !important;
}

.demo-calendar-page #calendar-month {
  min-width: 220px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
}

[data-theme="dark"] .demo-calendar-page {
  background:
    radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.1), transparent 24rem),
    linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
}

[data-theme="dark"] .demo-calendar-page .calendar-container {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #111827;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .demo-calendar-page #calendar-month {
  color: #f8fafc;
}

[data-theme="dark"] .calendar-nav-button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe4ef;
}

[data-theme="dark"] .calendar-nav-button:hover {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.12);
  color: #f8fafc;
}

[data-theme="dark"] .demo-calendar-page .calendar-view-toggle .btn-outline-primary {
  border-color: rgba(16, 185, 129, 0.46);
  background: rgba(255, 255, 255, 0.035);
  color: #a7f3d0;
}

[data-theme="dark"] .demo-calendar-page .calendar-view-toggle .btn-outline-primary:hover,
[data-theme="dark"] .demo-calendar-page .calendar-view-toggle .btn-outline-primary.active {
  border-color: #10b981;
  background: #10b981;
  color: #052e1c;
}

.calendar-body {
  display: flex;
  flex-direction: column;
}

.calendar-days {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-day {
  width: 14.28%;
  text-align: center;
  font-weight: bold;
}

[data-theme="dark"] .calendar-day {
  color: #94a3b8;
}

.calendar-dates {
  display: flex;
  flex-wrap: wrap;
}

.calendar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 650px;
}

.calendar-date {
  width: 14.28%;
  height: 100px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  position: relative;
  background: #fff;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.demo-calendar-page .calendar-date {
  min-height: 128px;
  height: auto;
  border-color: #e5e7eb;
  padding: 6px;
}

.demo-calendar-page .calendar-date:not(:empty):hover {
  background-color: #f8fffc;
  box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.08);
  cursor: pointer;
}

.calendar-date.today {
  background: #f0fdf4;
  box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.16);
}

.calendar-date.today .date-number {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
}

.calendar-date .date-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s;
}

[data-theme="dark"] .calendar-date {
  border-color: rgba(255, 255, 255, 0.09);
  background: #0f172a;
  color: #dbe4ef;
}

[data-theme="dark"] .demo-calendar-page .calendar-date:not(:empty):hover {
  background: #122033;
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.16);
}

[data-theme="dark"] .calendar-date.today {
  background: rgba(6, 95, 70, 0.24);
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.28);
}

[data-theme="dark"] .calendar-date.today .date-number {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

[data-theme="dark"] .calendar-date .date-number {
  color: #e5e7eb;
}

.calendar-date .cita-button {
  display: block;
  width: 100%;
  background-color: #059669;
  color: white;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  height: 20%;
}

[data-theme="dark"] .calendar-date .cita-button,
[data-theme="dark"] .custom-tooltip .cita-button {
  background-color: #10b981 !important;
  color: #052e1c;
}

[data-theme="dark"] .calendar-date .cita-button:hover,
[data-theme="dark"] .custom-tooltip .cita-button:hover {
  background-color: #34d399 !important;
  color: #052e1c;
}

.calendar-date .cita-button + .cita-button {
  margin-top: 3px;
}

.calendar-schedule {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  width: 100%;
  max-height: calc(100vh - 250px);
  min-height: 560px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

[data-theme="dark"] .calendar-schedule {
  border-color: rgba(255, 255, 255, 0.09);
  background: #0f172a;
}

.calendar-schedule.week-view {
  grid-template-columns: 72px repeat(7, minmax(130px, 1fr));
}

.schedule-time-axis,
.schedule-day-column {
  display: grid;
  position: relative;
}

.schedule-time-axis {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  border-right: 1px solid #e5e7eb;
}

[data-theme="dark"] .schedule-time-axis {
  border-right-color: rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #94a3b8;
}

.schedule-day-column {
  min-width: 0;
  border-right: 1px solid #e5e7eb;
  background:
    repeating-linear-gradient(
      to bottom,
      #fff 0,
      #fff 19px,
      #f1f5f9 20px
    );
}

[data-theme="dark"] .schedule-day-column {
  border-right-color: rgba(255, 255, 255, 0.09);
  background:
    repeating-linear-gradient(
      to bottom,
      #0f172a 0,
      #0f172a 19px,
      rgba(255, 255, 255, 0.055) 20px
    );
}

.schedule-day-column.today {
  background:
    linear-gradient(rgba(5, 150, 105, 0.055), rgba(5, 150, 105, 0.055)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 19px,
      rgba(5, 150, 105, 0.14) 20px
    );
}

[data-theme="dark"] .schedule-day-column.today {
  background:
    linear-gradient(rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.08)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 19px,
      rgba(16, 185, 129, 0.13) 20px
    );
}

.schedule-day-header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 44px;
  padding: 0.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  font-weight: 700;
}

[data-theme="dark"] .schedule-day-header {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #dbe4ef;
}

.schedule-day-header.today {
  color: #047857;
  background: #f0fdf4;
}

[data-theme="dark"] .schedule-day-header.today {
  background: rgba(16, 185, 129, 0.13);
  color: #a7f3d0;
}

.schedule-time-label {
  min-height: 20px;
  border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .schedule-time-label {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.schedule-time-label.is-hour {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}

.schedule-slot {
  min-height: 20px;
  transition: background-color 0.15s ease;
}

.schedule-slot:hover {
  background-color: rgba(5, 150, 105, 0.07);
  cursor: pointer;
}

[data-theme="dark"] .schedule-slot:hover {
  background-color: rgba(16, 185, 129, 0.14);
}

.schedule-slot.is-hour {
  border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .schedule-slot.is-hour {
  border-top-color: rgba(255, 255, 255, 0.09);
}

.schedule-entry {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 2;
  overflow: hidden;
  border-radius: 6px;
  background: #059669;
  color: #fff;
  padding: 5px 7px;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.22);
}

.schedule-entry:hover {
  background: #047857;
}

[data-theme="dark"] .schedule-entry {
  background: #10b981;
  color: #052e1c;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.24);
}

[data-theme="dark"] .schedule-entry:hover {
  background: #34d399;
}

.schedule-entry-time {
  display: block;
  font-size: 0.72rem;
  opacity: 0.88;
}

.calendar-date .more-citas {
  display: block;
  width: 100%;
  background-color: #6c757d;
  color: white;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  height: 20%;
  margin-top: 3px;
}

.custom-tooltip {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  border-radius: 5px;
  z-index: 1000;
}

[data-theme="dark"] .custom-tooltip {
  border-color: rgba(255, 255, 255, 0.09);
  background: #111827;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.custom-tooltip .cita-button {
  margin-bottom: 5px;
  background-color: #059669;
  color: white;
  text-align: center;
  border-radius: 5px;
  padding: 5px;
  cursor: pointer;
}

.custom-tooltip .cita-button:hover {
  background-color: #047857;
}

#citaDetailsModal {
  z-index: 1060;
}

#citaDetailsModal .modal-backdrop {
  z-index: 1059;
}

#citaDetailsModal .appointment-details-modal {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

#citaDetailsModal .appointment-details-header {
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

#citaDetailsModal .appointment-details-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

#citaDetailsModal .appointment-details-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  font-size: 1.15rem;
}

#citaDetailsModal .appointment-details-title h5 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

#citaDetailsModal .appointment-details-title p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.25;
}

#citaDetailsModal .appointment-details-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

#citaDetailsModal .appointment-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.95);
  color: #dc2626;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#citaDetailsModal .appointment-delete-button:hover {
  border-color: rgba(220, 38, 38, 0.34);
  background: #fee2e2;
  transform: translateY(-1px);
}

#citaDetailsModal .appointment-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  background-size: 0.75rem;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 1;
}

#citaDetailsModal .appointment-close-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

#citaDetailsModal .appointment-details-body {
  padding: 0;
  background: #f8fafc;
}

.appointment-details-panel {
  padding: 1.1rem;
}

.appointment-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.appointment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #059669;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.22);
}

.appointment-summary-text {
  min-width: 0;
}

.appointment-summary-text span,
.appointment-detail-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.appointment-summary-text strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.25;
}

.appointment-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.appointment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.appointment-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.appointment-detail-wide {
  grid-column: 1 / -1;
}

.appointment-detail-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #059669;
  font-size: 1rem;
}

.appointment-detail-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 0.98rem;
  line-height: 1.35;
}

.appointment-notes {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.appointment-note {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.appointment-note-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.appointment-note-header i {
  color: #059669;
}

.appointment-note p {
  margin: 0;
  padding: 0.95rem;
  color: #334155;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

[data-theme="dark"] #citaDetailsModal .appointment-details-modal {
  border-color: rgba(255, 255, 255, 0.1);
  background: #111827;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] #citaDetailsModal .appointment-details-header {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(13, 18, 25, 0.98), rgba(17, 24, 39, 0.98));
}

[data-theme="dark"] #citaDetailsModal .appointment-details-title h5 {
  color: #f8fafc;
}

[data-theme="dark"] #citaDetailsModal .appointment-details-title p,
[data-theme="dark"] .appointment-summary-text span,
[data-theme="dark"] .appointment-detail-label {
  color: #94a3b8;
}

[data-theme="dark"] #citaDetailsModal .appointment-details-icon,
[data-theme="dark"] .appointment-status {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

[data-theme="dark"] #citaDetailsModal .appointment-close-button {
  color: #cbd5e1;
}

[data-theme="dark"] #citaDetailsModal .appointment-close-button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

[data-theme="dark"] #citaDetailsModal .appointment-details-body {
  background: #0f172a;
}

[data-theme="dark"] .appointment-summary {
  border-color: rgba(16, 185, 129, 0.18);
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(6, 95, 70, 0.2));
}

[data-theme="dark"] .appointment-summary-text strong,
[data-theme="dark"] .appointment-detail-item strong {
  color: #f8fafc;
}

[data-theme="dark"] .appointment-detail-item,
[data-theme="dark"] .appointment-note {
  border-color: rgba(255, 255, 255, 0.09);
  background: #111827;
}

[data-theme="dark"] .appointment-detail-icon {
  background: rgba(255, 255, 255, 0.07);
  color: #6ee7b7;
}

[data-theme="dark"] .appointment-note-header {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
}

[data-theme="dark"] .appointment-note-header i {
  color: #6ee7b7;
}

[data-theme="dark"] .appointment-note p {
  color: #dbe4ef;
}

#createCitaModal {
  z-index: 1080;
}

[data-theme="dark"] #createCitaModal .modal-content,
[data-theme="dark"] #deleteCitaModal .modal-content,
[data-theme="dark"] #demoDisclaimerModal .modal-content {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #e5e7eb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] #createCitaModal .modal-header,
[data-theme="dark"] #deleteCitaModal .modal-header,
[data-theme="dark"] #demoDisclaimerModal .modal-header,
[data-theme="dark"] #createCitaModal .modal-footer,
[data-theme="dark"] #deleteCitaModal .modal-footer,
[data-theme="dark"] #demoDisclaimerModal .modal-footer {
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] #createCitaModal .form-control {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #f8fafc;
}

[data-theme="dark"] #createCitaModal .form-control:focus {
  border-color: rgba(16, 185, 129, 0.58);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.16);
}

[data-theme="dark"] #createCitaModal .form-control::placeholder {
  color: #64748b;
}

[data-theme="dark"] #createCitaModal label {
  color: #cbd5e1;
}

#createCitaModal .modal-header {
  position: relative;
}

#createCitaModalLabel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

#createCitaModal .btn-close {
  position: relative;
  z-index: 1;
  margin-left: auto;
}

#createCitaModal + .modal-backdrop,
.modal-backdrop.create-cita-backdrop {
  z-index: 1070;
}

/*------------------------------------*/

.day-citas-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* Left column (Hour Labels) */
.day-schedule {
  display: grid;
  grid-template-rows: repeat(96, 20px);
  /* 96 rows for 15-minute slots */
  align-items: center;
  text-align: center;
  font-size: 14px;
  color: gray;
  padding-right: 5px;
  /* Even though we hide the scrollbar, we still want this element to be scrollable programmatically */
  overflow-y: hidden;
  height: 100%;
}

/* Right column (Appointments) - This should be scrollable */
/* Right column (Appointments) */
.day-citas-column {
  display: grid;
  grid-template-rows: repeat(96, 20px);
  /* 96 rows for 15-minute slots */
  position: relative;
  /* Important: Makes sure .cita-entry is positioned correctly */
  width: 100%;
  background:
    repeating-linear-gradient(
      to bottom,
      #fff 0,
      #fff 79px,
      #f1f5f9 80px
    );
  border-left: 1px solid #ddd;
}

[data-theme="dark"] .day-citas-column {
  border-left-color: rgba(255, 255, 255, 0.09);
  background:
    repeating-linear-gradient(
      to bottom,
      #0f172a 0,
      #0f172a 79px,
      rgba(255, 255, 255, 0.055) 80px
    );
}

/* Hide the left column scrollbar (if any) */
.day-schedule::-webkit-scrollbar {
  display: none;
}

.day-citas-column::-webkit-scrollbar {
  width: 8px;
}

.day-citas-column::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Hour labels */
.hour-label {
  height: 20px;
  /* 1 hour = 80px */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  transition: background-color 0.15s ease;
}

[data-theme="dark"] .hour-label {
  border-top-color: rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #94a3b8;
}

/* 15-minute placeholders for spacing */
.hour-placeholder {
  height: 20px;
  /* 15-minute spacing */
  border-bottom: none;
  transition: background-color 0.15s ease;
}

.day-schedule .hour-placeholder {
  background: #f8f9fa;
}

[data-theme="dark"] .day-schedule .hour-placeholder {
  background: #111827;
}

.hour-placeholder-right {
  height: 20px;
  /* 15-minute spacing */
  border-bottom: none;
  border-top: none;
  transition: background-color 0.15s ease;
}

.day-citas-column .hour-placeholder,
.day-citas-column .hour-placeholder-right {
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="dark"] .day-citas-column .hour-placeholder,
[data-theme="dark"] .day-citas-column .hour-placeholder-right {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.hour-placeholder-right[data-minute="0"] {
  border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .hour-placeholder-right[data-minute="0"] {
  border-top-color: rgba(255, 255, 255, 0.09);
}

.hour-label:hover,
.hour-placeholder:hover,
.hour-placeholder-right:hover {
  background-color: rgba(5, 150, 105, 0.07);
  cursor: pointer;
}

[data-theme="dark"] .hour-label:hover,
[data-theme="dark"] .hour-placeholder:hover,
[data-theme="dark"] .hour-placeholder-right:hover {
  background-color: rgba(16, 185, 129, 0.14);
}

/* Appointment Cards */
.cita-entry {
  position: absolute;
  /* Positions based on calculated top value */
  width: 90%;
  left: 5%;
  background: #6c63ff;
  color: white;
  padding: 5px;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
  cursor: pointer;
  /* Changes cursor to pointer on hover */
}

.cita-entry:hover {
  background: #5040d3;
  /* Darker blue on hover */
  transform: scale(1.05);
  /* Slightly enlarges the entry */
}

[data-theme="dark"] .cita-entry {
  background: #10b981;
  color: #052e1c;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.24);
}

[data-theme="dark"] .cita-entry:hover {
  background: #34d399;
}

.modal-open .modal {
  overflow-y: auto !important;
}

.day-citas-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1065;
  display: flex;
  flex-direction: column;
  width: min(460px, 92vw);
  height: 100vh;
  background: #fff;
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.22);
  transform: translateX(-105%);
  transition: transform 0.25s ease;
}

[data-theme="dark"] .day-citas-drawer {
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #e5e7eb;
  box-shadow: 12px 0 36px rgba(0, 0, 0, 0.55);
}

.day-citas-drawer.show {
  transform: translateX(0);
}

.day-citas-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .day-citas-drawer-header {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  background: #0f172a;
}

.day-citas-drawer-header h5 {
  position: absolute;
  left: 3rem;
  right: 3rem;
  text-align: center;
  pointer-events: none;
}

.day-citas-drawer-header .btn-close {
  margin-left: auto;
}

.day-citas-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.day-citas-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  background: rgba(15, 23, 42, 0.35);
}

[data-theme="dark"] .day-citas-drawer-backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.day-citas-drawer-backdrop.show {
  display: block;
}

@media (max-width: 768px) {
  .demo-calendar-page .calendar-container {
    padding: 12px;
  }

  .demo-calendar-page .calendar-header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 0.55rem;
  }

  .demo-calendar-page #calendar-month {
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .demo-calendar-page .calendar-view-toggle {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .calendar-view-toggle .btn {
    min-width: 64px;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    font-size: 0.9rem;
  }

  .demo-calendar-page .calendar-date {
    min-height: 96px;
    padding: 4px;
  }

  .calendar-schedule {
    min-height: 520px;
    max-height: calc(100vh - 230px);
  }

  #citaDetailsModal .modal-dialog {
    margin: 0.75rem;
  }

  #citaDetailsModal .appointment-details-header {
    align-items: flex-start;
    padding: 0.9rem;
  }

  #citaDetailsModal .appointment-details-icon {
    width: 38px;
    height: 38px;
  }

  #citaDetailsModal .appointment-details-title p {
    display: none;
  }

  .appointment-details-panel {
    padding: 0.85rem;
  }

  .appointment-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .appointment-status {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .appointment-detail-grid {
    grid-template-columns: 1fr;
  }
}
