.diary-day_note.form-control {
  min-height: 125px;
}


.agenda-item-mood svg{
  height: 35px;
  width: 35px;
}


.agenda-item:hover .agenda-item-mood svg {
  transform: scale(1.08);
}


.agenda-item {
  cursor: pointer;
  border-radius: 12px;
}


.agenda-item:hover {
  transform: translateY(-2px);
}


.diary-days-calendar_cell {
  text-align: center;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
}


.diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive) {
  transform: translateY(-2px);
  background-color: rgba(102, 126, 234, 0.05);
}

.diary-days-calendar_cell-status {
  padding-bottom: 15px;
  position: relative;
}


.diary-days-calendar_cell-status svg {
  width: 100%;
  height: 100%;
}

/* Mood face styling for calendar cells */
.diary-days-calendar_mood-face {
  display: flex;
  justify-content: center;
  align-items: center;
}

.diary-days-calendar_mood-face svg.calendar-mood-face {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

@media screen and (max-width: 768px) {
  .diary-days-calendar_mood-face svg.calendar-mood-face {
    width: 45px;
    height: 45px;
  }
}

@media screen and (max-width: 480px) {
  .diary-days-calendar_mood-face svg.calendar-mood-face {
    width: 35px;
    height: 35px;
  }
}


.diary-days-calendar_mood-trend {
  position: absolute;
  top: -2px;
  right: 0;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}


@media screen and (max-width: 600px) {
  .diary-days-calendar_mood-trend {
    font-size: 12px;
    top: -1px;
  }
}


.diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive) .diary-days-calendar_cell-status svg {
  transform: scale(1.1);
}
/* Remove transitions and shadows for mobile for better performance */
@media (max-width: 600px) {
  .agenda-item-mood svg,
  .agenda-item,
  .diary-days-calendar_cell,
  .diary-days-calendar_cell-status svg,
  .diary-date-navigation_arrow,
  .diary-month-navigation_arrow,
  .diary-month-navigation_filter,
  .agenda-filter-option {
    filter: none !important;
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
  }
  .agenda-item:hover,
  .diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive),
  .diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive) .diary-days-calendar_cell-status svg,
  .agenda-item:hover .agenda-item-mood svg,
  .diary-date-navigation_arrow:hover:not(:disabled),
  .diary-month-navigation_arrow:hover:not(:disabled),
  .diary-month-navigation_filter:hover,
  .agenda-filter-option:hover {
    transform: none !important;
  }
}

.diary-days-calendar_month-day {
  font-size: 14px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.diary-days-calendar_weekday-column {
  width: 14.28571428571429%;
}

@media screen and (max-width: 400px) {
  .diary-days-calendar_weekday-column {
    font-size: 11.5px;
  }
}

.diary-days-calendar_cell--muted {
  opacity: 0.3;
}

.diary-days-calendar_cell--inactive {
  cursor: inherit;
}

.diary-date-navigation_date-input {
  display: inline-block;
  width: 210px;
  text-decoration: none;
  height: 38px;
  min-height: 38px;
}

@media screen and (max-width: 400px) {
  .diary-date-navigation_date-input {
    width: 180px;
    font-size: 16px;
    padding-top: 8px;
    padding-bottom: 12px;
  }
}

/* ============================================ */
/* DATE NAVIGATION - STUNNING STYLING */
/* ============================================ */

.diary-date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
}

.diary-date-navigation_arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.diary-date-navigation_arrow:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.diary-date-navigation_arrow:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.diary-date-navigation_arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.diary-date-navigation_date-text {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  min-width: 210px;
  text-align: center;
  padding: 8px 16px;
}

@media screen and (max-width: 400px) {
  .diary-date-navigation {
    gap: 12px;
  }
  
  .diary-date-navigation_arrow {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .diary-date-navigation_date-text {
    font-size: 16px;
    min-width: 180px;
    padding: 6px 12px;
  }
}

/* ============================================ */
/* MONTH NAVIGATION - STUNNING STYLING */
/* ============================================ */

.diary-month-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.diary-month-navigation_arrow,
.diary-month-navigation_filter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.diary-month-navigation_arrow:hover:not(:disabled),
.diary-month-navigation_filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.diary-month-navigation_arrow:active:not(:disabled),
.diary-month-navigation_filter:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.diary-month-navigation_arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.diary-month-navigation_date-text {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  padding: 8px 16px;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .diary-month-navigation_arrow,
  .diary-month-navigation_filter {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .diary-month-navigation_date-text {
    font-size: 18px;
  }
}

@media screen and (max-width: 400px) {
  .diary-month-navigation {
    gap: 8px;
  }
  
  .diary-month-navigation_arrow,
  .diary-month-navigation_filter {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .diary-month-navigation_date-text {
    font-size: 16px;
    padding: 6px 8px;
  }
}

.diary-agenda_entry-activity--muted {
  opacity: 0.3;
}

.diary-days-calendar_cell-activities {
  justify-content: center;
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 100%;
  height: 10px;
}

.diary-days-calendar_cell-activities .diary-field-score_badge-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  padding: 1px;
}

.diary-days-calendar_cell-activities .diary-field-score_badge-icon i.icon-flex {
  display: flex;
  justify-content: center;
}

.diary-days-calendar_cell-activity {
  display: inline-block;
  margin-right: -4px;
  vertical-align: middle;
}

.diary-days-calendar_rest-activities-score {
  display: flex;
  height: 10px;
  width: 10px;
  font-size: 5px;
}

.diary-days-calendar_rest-activities {
  margin-left: -4px;
}

.diary-days-calendar {
  overflow: hidden;
}

/* Calendar infinite scroll styles */
.calendar-infinite-scroll {
  max-width: 100%;
}

.calendar-month {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calendar-month-header {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.5rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding: 8px 0;
  z-index: 10;
}

/* Calendar cell styles */
.calendar-cell {
  vertical-align: top;
  padding: 4px !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-width: 40px;
}

.calendar-cell:hover:not(.calendar-cell--future) {
  background-color: rgba(102, 126, 234, 0.08);
}

.calendar-cell--today {
  background-color: rgba(13, 110, 253, 0.1) !important;
}

.calendar-cell--future {
  opacity: 0.5;
  cursor: default;
}

.calendar-cell--muted {
  opacity: 0.3;
}

.calendar-cell-empty {
  min-width: 40px;
}

.calendar-cell-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.calendar-cell-mood {
  display: flex;
  justify-content: center;
  align-items: center;
}

.calendar-cell-mood svg.calendar-mood-face {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

.calendar-cell-day {
  font-size: 12px;
  color: #666;
}

.calendar-cell-activities-count {
  font-size: 10px;
  color: #999;
  background: #f0f0f0;
  border-radius: 8px;
  padding: 1px 5px;
}

.calendar-weekday {
  font-size: 12px;
  padding: 8px 2px !important;
  font-weight: 600;
  color: #666;
}

/* Tablet styles */
@media screen and (max-width: 768px) {
  .calendar-month {
    padding: 8px;
    border-radius: 8px;
  }

  .calendar-month-header {
    font-size: 1.25rem;
  }

  .calendar-cell-mood svg.calendar-mood-face {
    width: 32px;
    height: 32px;
  }

  .calendar-cell-day {
    font-size: 11px;
  }

  .calendar-weekday {
    font-size: 11px;
    padding: 6px 2px !important;
  }
}

/* Mobile styles - 360px width */
@media screen and (max-width: 400px) {
  .calendar-month {
    padding: 4px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 0;
    box-shadow: none;
  }

  .calendar-month-header {
    font-size: 1.1rem;
    padding: 4px 0;
  }

  .calendar-cell {
    padding: 2px !important;
  }

  .calendar-cell-mood svg.calendar-mood-face {
    width: 28px;
    height: 28px;
  }

  .calendar-cell-day {
    font-size: 10px;
  }

  .calendar-cell-activities-count {
    font-size: 8px;
    padding: 0px 3px;
  }

  .calendar-weekday {
    font-size: 9px;
    padding: 4px 1px !important;
  }

  .calendar-table {
    font-size: 10px;
  }

  /* Shorter weekday names for mobile */
  .calendar-weekday {
    letter-spacing: -0.5px;
  }
}

/* Extra small mobile */
@media screen and (max-width: 340px) {
  .calendar-cell-mood svg.calendar-mood-face {
    width: 24px;
    height: 24px;
  }

  .calendar-cell-day {
    font-size: 9px;
  }

  .calendar-cell-activities-count {
    display: none;
  }

  .calendar-weekday {
    font-size: 8px;
  }
}

@media screen and (min-width: 769px) {
  .diary-days-calendar_cell-activities {
    justify-content: center;
    position: absolute;
    bottom: 20px;
    height: 20px;
  }

  .diary-days-calendar_rest-activities-score {
    display: flex;
    height: 20px;
    width: 20px;
    font-size: 12px;
  }

  .diary-days-calendar_cell-activities .diary-field-score_badge-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    padding: 1px;
  }

  .diary-days-calendar_cell-activities .diary-field-score_badge-icon i.icon-flex {
    display: flex;
    justify-content: center;
  }
}

a[data-controller="activity-tooltip"] {
  -webkit-user-select: none; /* Prevents text selection */
  -webkit-touch-callout: none; /* Disables the context menu on long press */
  user-select: none;
  touch-callout: none;
}

.mood-scale_interactive-area {
  cursor: pointer;
}

/* ============================================ */
/* AGENDA ACTIVITY WRAPPERS */
/* ============================================ */

.agenda-activity-wrapper--highlighted .activity-button__icon-wrapper {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5) !important;
}

.agenda-activities-compact {
  min-height: 32px;
}

.agenda-filter-item {
  cursor: pointer;
}

.agenda-filter-item--selected .activity-button__icon-wrapper {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5) !important;
}

/* ============================================ */
/* AGENDA FILTER */
/* ============================================ */

.agenda-filter-options {
  max-height: 300px;
  overflow-y: auto;
}

.agenda-filter-option {
  transition: all 0.2s ease;
}

.agenda-filter-option:hover {
  transform: translateY(-1px);
}

/* ============================================ */
/* AGENDA EXPANDED VIEW */
/* ============================================ */

.agenda-activities-expanded {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 12px;
  margin-top: 8px;
  min-height: 75px;
}

/* ============================================ */
/* ACCESSIBILITY - REDUCED MOTION SUPPORT */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
  .agenda-item-mood svg,
  .agenda-item,
  .diary-days-calendar_cell,
  .diary-days-calendar_cell-status svg,
  .diary-date-navigation_arrow,
  .diary-month-navigation_arrow,
  .diary-month-navigation_filter,
  .agenda-filter-option {
    animation: none;
    transition: none;
  }

  .agenda-item:hover,
  .diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive),
  .diary-days-calendar_cell:hover:not(.diary-days-calendar_cell--inactive) .diary-days-calendar_cell-status svg,
  .agenda-item:hover .agenda-item-mood svg,
  .diary-date-navigation_arrow:hover:not(:disabled),
  .diary-month-navigation_arrow:hover:not(:disabled),
  .diary-month-navigation_filter:hover,
  .agenda-filter-option:hover {
    transform: none;
  }
}

/* ============================================ */
/* COMPACT CALENDAR - MOBILE-FIRST DESIGN      */
/* ============================================ */

.calendar-page {
  padding: 0 8px;
}

.cal-month {
  margin-bottom: 24px;
}

.cal-month-header {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c3e50;
  padding: 12px 0 8px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

/* Weekday header row */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  padding: 4px 0;
}

/* Calendar grid */
.cal-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* Individual day cell */
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  background: #f8f9fa;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cal-day:hover:not(.cal-day--future):not(.cal-day--empty) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 1;
}

.cal-day--empty {
  background: transparent;
  cursor: default;
}

.cal-day--today {
  box-shadow: inset 0 0 0 2px #0d6efd;
}

.cal-day--future {
  opacity: 0.4;
  cursor: default;
}

.cal-day--muted {
  opacity: 0.25;
}

/* Day number */
.cal-day-num {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1;
}

.cal-day--future .cal-day-num {
  color: #999;
}

/* Mood indicator dot */
.cal-mood-dot {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Activity indicator dot */
.cal-activity-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6c757d;
}

/* When day has activities matching filter */
.cal-day--has-mood .cal-activity-dot {
  background: #495057;
}

/* ============================================ */
/* COMPACT CALENDAR - TABLET (768px)           */
/* ============================================ */

@media screen and (min-width: 481px) {
  .cal-day {
    min-height: 52px;
  }

  .cal-day-num {
    font-size: 15px;
  }

  .cal-mood-dot {
    width: 10px;
    height: 10px;
    bottom: 5px;
  }

  .cal-activity-dot {
    width: 7px;
    height: 7px;
    top: 5px;
    right: 5px;
  }

  .cal-month-header {
    font-size: 1.25rem;
  }

  .cal-weekday {
    font-size: 12px;
  }
}

/* ============================================ */
/* COMPACT CALENDAR - DESKTOP (769px+)         */
/* ============================================ */

@media screen and (min-width: 769px) {
  .calendar-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
  }

  .cal-day {
    min-height: 60px;
  }

  .cal-day-num {
    font-size: 16px;
  }

  .cal-mood-dot {
    width: 12px;
    height: 12px;
    bottom: 6px;
  }

  .cal-activity-dot {
    width: 8px;
    height: 8px;
    top: 6px;
    right: 6px;
  }

  .cal-month-header {
    font-size: 1.4rem;
    padding: 16px 0 12px;
  }

  .cal-weekday {
    font-size: 13px;
    padding: 6px 0;
  }

  .cal-weekdays {
    gap: 4px;
    margin-bottom: 6px;
  }

  .cal-grid {
    gap: 4px;
  }

  .cal-week {
    gap: 4px;
  }
}

/* ============================================ */
/* COMPACT CALENDAR - EXTRA SMALL (340px)      */
/* ============================================ */

@media screen and (max-width: 340px) {
  .calendar-page {
    padding: 0 4px;
  }

  .cal-day {
    min-height: 38px;
    border-radius: 6px;
  }

  .cal-day-num {
    font-size: 12px;
  }

  .cal-mood-dot {
    width: 6px;
    height: 6px;
    bottom: 3px;
  }

  .cal-activity-dot {
    width: 5px;
    height: 5px;
    top: 3px;
    right: 3px;
  }

  .cal-month-header {
    font-size: 1rem;
  }

  .cal-weekday {
    font-size: 10px;
  }
}

/* Disable animations on mobile for performance */
@media screen and (max-width: 480px) {
  .cal-day {
    transition: none;
  }

  .cal-day:hover:not(.cal-day--future):not(.cal-day--empty) {
    transform: none;
    box-shadow: none;
  }
}
