/* Base styles for SimpleCalendar.js */
.simpleCalendar {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  color: #212121;
}

/* Calendar header */
.calendar-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

@media (min-width: 640px) {
  .calendar-header {
    flex-direction: row;
    align-items: center;
  }
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.header-badge {
  background-color: #3f51b5;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

.header-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .header-controls {
    flex-direction: row;
    align-items: center;
    width: auto;
  }
}

/* View selector */
.view-selector {
  display: flex;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.view-selector button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: white;
  color: #616161;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.view-selector button:hover {
  background-color: #f5f5f5;
}

.view-selector button.active {
  background-color: #3f51b5;
  color: white;
}

/* Navigation controls */
.navigation-controls {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 0.375rem;
  border: 1px solid #e0e0e0;
  padding: 0.25rem;
}

.nav-btn {
  padding: 0.5rem;
  color: #616161 !important;
  background: none !important;
  border: none;
  cursor: pointer !important;
  border-radius: 0.375rem;
  transition: color 0.2s, background-color 0.2s;
}

.nav-btn:hover {
  color: #3f51b5 !important;
  background-color: #f5f5f5 !important;
}

.today-btn {
  margin: 0 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.month-year-display {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #212121;
  padding: 0 0.5rem;
}

/* Calendar toolbar */
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.create-event-btn {
  background-color: #3f51b5;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.create-event-btn:hover {
  background-color: #303f9f;
}

/* Removed search and filter related styles */

/* Calendar body */
.calendar-body {
  background-color: white;
  border-radius: 0.75rem;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Weekdays header */
.weekdays-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.weekday {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #616161;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  min-height: 600px;
  position: relative;
}

.calendar-day {
  height: 100px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  padding: 0.5rem;
  position: relative;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-day:hover {
  background-color: rgba(63, 81, 181, 0.05);
}

.calendar-day[data-day="prev-month"],
.calendar-day[data-day="next-month"] {
  background-color: #f9f9f9;
}

.calendar-day.today {
  background-color: #e8eaf6;
}

.day-number {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.calendar-day[data-day="prev-month"] .day-number,
.calendar-day[data-day="next-month"] .day-number {
  color: #9e9e9e;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.event-item {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 2px solid;
}

.event-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Event colors */
.event-color-green, 
.event-item.event-color-green {
  background-color: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border-color: #28a745;
}

.event-color-green:hover {
  background-color: rgba(40, 167, 69, 0.25);
}

.event-color-black, 
.event-item.event-color-black {
  background-color: rgba(52, 58, 64, 0.15);
  color: #343a40;
  border-color: #343a40;
}

.event-color-black:hover {
  background-color: rgba(52, 58, 64, 0.25);
}

.event-color-blue, 
.event-item.event-color-blue {
  background-color: rgba(0, 123, 255, 0.15);
  color: #007bff;
  border-color: #007bff;
}

.event-color-blue:hover {
  background-color: rgba(0, 123, 255, 0.25);
}

.event-color-purple, 
.event-item.event-color-purple {
  background-color: rgba(111, 66, 193, 0.15);
  color: #6f42c1;
  border-color: #6f42c1;
}

.event-color-purple:hover {
  background-color: rgba(111, 66, 193, 0.25);
}

/* Calendar footer */
.calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #616161;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.category-color {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
}

.category-meeting {
  background-color: #3f51b5;
}

.category-call {
  background-color: #2196f3;
}

.category-interview {
  background-color: #4caf50;
}

.category-social {
  background-color: #ff9800;
}

.category-conference {
  background-color: #f50057;
}

/* Event modals */
.event-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.event-modal.is-visible {
  visibility: visible;
}

.event-modal.modal-active {
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-active .modal-overlay {
  opacity: 1;
}

.modal-content {
  position: relative;
  max-width: 28rem;
  width: 100%;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  color: #212121;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #616161;
  font-size: 1rem;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #212121;
}

/* Event form */
.event-form {
  padding: 0 1.5rem 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #616161;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cancel-btn {
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #616161;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cancel-btn:hover {
  background-color: #f5f5f5;
}

.save-btn {
  padding: 0.5rem 1rem;
  background-color: #3f51b5;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-btn:hover {
  background-color: #303f9f;
}

/* Event details */
.event-color-bar {
  height: 0.25rem;
  background-color: #3f51b5;
  border-radius: 0.375rem 0.375rem 0 0;
}

.category-meeting {
  background-color: #3f51b5;
}

.category-call {
  background-color: #2196f3;
}

.category-interview {
  background-color: #4caf50;
}

.category-social {
  background-color: #ff9800;
}

.category-conference {
  background-color: #f50057;
}

.event-details-content {
  padding: 1rem 1.5rem;
}

.details-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.details-icon {
  color: #9e9e9e;
  font-size: 1rem;
  margin-top: 0.125rem;
}

.details-info {
  flex: 1;
}

.event-date {
  font-weight: 500;
  color: #212121;
  font-size: 0.875rem;
}

.event-time {
  color: #616161;
  font-size: 0.875rem;
}

.event-category {
  font-size: 0.875rem;
  color: #212121;
}

.event-description {
  font-size: 0.875rem;
  color: #212121;
  white-space: pre-line;
}

.event-actions {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
}

.delete-btn,
.edit-btn,
.done-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.delete-btn {
  color: #616161;
  border: 1px solid #e0e0e0;
  background-color: white;
}

.delete-btn:hover {
  background-color: #f5f5f5;
}

.edit-btn {
  color: #616161;
  border: 1px solid #e0e0e0;
  background-color: white;
}

.edit-btn:hover {
  background-color: #f5f5f5;
}

.done-btn {
  color: white;
  background-color: #3f51b5;
  border: none;
}

.done-btn:hover {
  background-color: #303f9f;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .calendar-grid {
    grid-auto-rows: minmax(80px, auto);
  }
  
  .calendar-day {
    min-height: 80px;
  }
  
  .weekday {
    font-size: 0.75rem;
  }
  
  .event-item {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 640px) {
  .calendar-grid {
    grid-auto-rows: minmax(60px, auto);
  }
  
  .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
  }
  
  .day-number {
    font-size: 0.75rem;
  }
  
  .category-list {
    display: none;
  }
}

/* Theme variants */
.simpleCalendar[data-theme="dark"] {
  /* Dark theme CSS variables would go here */
  background-color: #121212;
  color: #e0e0e0;
}

.simpleCalendar[data-theme="custom"] {
  /* Custom theme will use CSS variables set in JavaScript */
}

/* Event Popup */
.event-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.event-popup-content {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.event-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #333;
}

.event-popup-date {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.event-popup-time {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.event-popup-category {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
  background-color: #f5f5f5;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.event-popup-description {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.event-popup-link {
  display: inline-block;
  background-color: #007bff;
  color: white !important;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  margin-bottom: 0.5rem;
}

.event-popup-link:hover {
  background-color: #0056b3;
  color: white;
}



/* Multi-day event styles */
.multi-day-event {
  position: relative;
  font-weight: 500;
  border-radius: 3px;
}

.multi-day-start {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  position: relative;
}

.multi-day-middle {
  border-radius: 0;
  opacity: 0.9;
  position: relative;
}

.multi-day-end {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  position: relative;
}

/* Visual continuity indicators */
.multi-day-start::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: inherit;
  border-radius: 0;
}

.multi-day-middle::before,
.multi-day-middle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: inherit;
}

.multi-day-middle::before {
  left: -1px;
}

.multi-day-middle::after {
  right: -1px;
}

.multi-day-end::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: inherit;
  border-radius: 0;
}

/* Spanning event styles */
.spanning-event {
  position: absolute !important;
  z-index: 10;
  height: 18px;
  font-size: 11px;
  line-height: 16px;
  margin: 18px 2px 2px 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
