/* Weekdays row */
.weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

.weekday-header {
  font-weight: bold;
  text-align: center;
  padding: 10px 5px;
  background: #e0e0e0;
  border-radius: 5px;
  font-size: 0.95rem;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-cell {
  border: 2px solid #333;
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.day-cell:hover:not(.empty) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.day-cell.empty {
  border: none;
  background: transparent;
  cursor: default;
}

.date {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1;
}

.activities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  flex-grow: 1;
}

.activity-item {
  margin: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.activity-item span {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.3;
}

.delete-activity-btn {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.delete-activity-btn:hover {
  background: #cc0000;
  transform: scale(1.15);
}

.month-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 20px;
  gap: 20px;
}

.month-nav h2 {
  text-align: center;
  margin: 0;
  font-size: 1.8rem;
}

.nav-btn {
  padding: 10px 20px;
  font-size: 1rem;
  background: #e0e0e0;
  color: rgb(1, 1, 1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.nav-btn:hover {
  background: #bab3c2;
}

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

.modal:not(.hidden) {
  display: flex;
}

.hidden {
  display: none !important;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
}

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

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-save,
.btn-cancel {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
}

.btn-save {
  background: #4CAF50;
  color: white;
}

.btn-save:hover {
  background: #45a049;
}

.btn-cancel {
  background: #f44336;
  color: white;
}

.btn-cancel:hover {
  background: #da190b;
}

/* Emoji Picker */
emoji-picker {
  width: 100%;
  height: 300px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

#selected-emoji-display {
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* RESPONSIVE - MOBIL */
@media (max-width: 768px) {
  .day-cell {
    min-height: 90px;
    padding: 8px;
  }
  
  .date {
    font-size: 1.1rem;
  }
  
  .activity-item {
    font-size: 0.8rem;
  }
  
  .activity-item span {
    font-size: 0.8rem;
  }
  
  .weekday-header {
    font-size: 0.8rem;
    padding: 8px 3px;
  }
  
  .month-nav h2 {
    font-size: 1.4rem;
  }
  
  .nav-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .day-cell {
    min-height: 70px;
    padding: 5px;
  }
  
  .date {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }
  
  .activity-item {
    font-size: 0.7rem;
    margin: 3px 0;
    padding: 2px;
  }
  
  .activity-item span {
    font-size: 0.7rem;
  }
  
  .delete-activity-btn {
    width: 18px;
    height: 18px;
    font-size: 1rem;
  }
  
  .weekday-header {
    font-size: 0.7rem;
    padding: 5px 2px;
  }
  
  .month-nav h2 {
    font-size: 1.2rem;
  }
  
  .nav-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

.checkbox-group {
  margin: 15px 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  transform: scale(1.2);
}

#selected-weekday {
  font-weight: bold;
  color: #667eea;
}

#time-fields.hidden {
  display: none;
}