/* Card Styles */
.card {
    background-color: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: scaleIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(10px);
  }
  
  .card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }
  
  .card-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }
  
  .card-header h2 {
    margin: 0;
    font-size: 1.25rem;
  }
  
  .expanda-btn {
    background: none;
    border: none;
    color: var(--foreground);
    opacity: 0.5;
    transition: opacity 0.2s;
  }
  
  .expanda-btn:hover {
    opacity: 1;
  }
  
  .card-body {
    padding: 1rem;
    min-height: 200px;
  }

/* Collapsed state for cards */
.card-collapsed {
  border: none; /* Remove card border */
  box-shadow: none; /* Remove card shadow */
  background: transparent; /* Remove card background */
  overflow: visible; /* Allow header to escape card boundaries */
}

.card-collapsed .card-body {
  display: none; /* Hide the card body */
}

.card-collapsed .card-header {
  border-bottom: none; /* Remove header bottom border */
  border-radius: var(--radius); /* Maintain rounded corners on header */
  background: var(--card); /* Restore header background to match card */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Restore header shadow */
}
  
.card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.card.drag-over {
  border: 2px dashed var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}


/* Todo Card Styles */
.todo-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 5px; 
}

.todo-container::-webkit-scrollbar {
  width: 6px;
}

.todo-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.todo-container::-webkit-scrollbar-track {
  background-color: transparent;
}

.todo-form {
  display: flex;
  gap: 0.5rem;
}

.todo-form input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
}

.todo-form button, .todo-item button {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: var(--secondary);
  border-radius: var(--radius);
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.todo-item.completed {
  text-decoration: line-through;
  opacity: 0.7;
}

.todo-item-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 4px;
  border: 1px solid var(--input);
  background-color: var(--background);
  position: relative;
  cursor: pointer;
}

.todo-item-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.todo-item-text {
  flex: 1;
}

.todo-item-delete {
  background: none !important;
  border: none;
  color: var(--destructive) !important;
  padding: 0.25rem !important;
  border-radius: var(--radius);
  cursor: pointer;
}
  
  /* Calendar Card Styles */
  .calendar-container {
    font-size: small;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .calendar-header button {
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
  }
  
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.1rem;
  }
  
  .weekday {
    text-align: center;
    font-weight: 500;
    padding: 0.5rem;
  }
  
  .calendar-day {
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
  }
  
  .calendar-day:hover {
    background-color: var(--muted);
  }
  
  .calendar-day.today {
    background-color: var(--primary);
    color: var(--primary-foreground);
  }
  
  .calendar-day.has-event {
    position: relative;
  }
  
  .calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
  }
  
  /* Timer Card Styles */
  .timer-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .timer-display {
    font-size: 3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
  }
  
  .timer-controls {
    display: flex;
    gap: 0.5rem;
  }
  
  .timer-controls button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
  }
  
  .timer-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .timer-type {
    display: flex;
    gap: 0.5rem;
  }
  
  .timer-type-btn {
    padding: 0.25rem 0.5rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
  }
  
  .timer-type-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
  }
  
  /* Clock Card Styles */
  .clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .digital-clock {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
  }
  
  .timezone-select select {
    padding: 0.5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
  }
  
/* Days Counter Card Styles */
.counter-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 300px; 
  overflow-y: auto; 
}

.counter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.counter-form input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
}

.counter-form button {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
}

.counter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.counter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--secondary);
  border-radius: var(--radius);
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.counter-item-info {
  display: flex;
  flex-direction: column;
}

.counter-item-name {
  font-weight: 500;
}

.counter-item-date {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.counter-item-days {
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
}
  
/* Daily Planner Card Styles */
.current-date {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.planner-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.planner-date {
  text-align: center;
}

.planner-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 5px; 
}

.planner-schedule::-webkit-scrollbar {
  width: 6px;
}

.planner-schedule::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.planner-schedule::-webkit-scrollbar-track {
  background-color: transparent;
}

.schedule-item {
  display: flex;
  padding: 0.75rem;
  background-color: var(--secondary);
  border-radius: var(--radius);
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.schedule-time {
  width: 4rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.schedule-content {
  text-align: center;
  background-color: var(--background);
  border-radius: 10px;
  flex: 1;
  min-height: 2.5rem;
  cursor: pointer;
}

.schedule-content:hover {
  background-color: rgba(193, 189, 189, 0.409);
  border-radius: 20px;
}

.schedule-edit-input {
  width: 100%;
  padding: 1.0rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
}

.add-schedule-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.time-picker {
  position: relative;
}

.time-input {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  width: 45px;
}

  @media (min-width: 1440px) {
    .time-input{
      width:100%
    }
  }
  
  #schedule-content {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    width:100px
  }
  
  #add-schedule {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
  }
  
  /* Make card body content scrollable when in modal */
  #modal-body .planner-schedule {
    max-height: 50vh; /* Taller in modal view */
  }
  
  /* Add hover styles to enhance the expanda button user experience */
  .expanda-btn {
    background: none;
    border: none;
    color: var(--foreground);
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
  }
  
  .expanda-btn:hover {
    opacity: 1;
    background-color: var(--secondary);
    transform: scale(1.1);
  }
  
  /* Notes Card Styles */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-list {
  display: flex;
  flex-direction: column;
  max-height: 150px; /* Set a fixed height for the notes list */
  overflow-y: auto; /* Enable vertical scrolling */
  padding-right: 5px; /* Prevent content from touching scrollbar */
  position: relative; /* Ensure relative positioning for overlap */
}

/* Optional: Custom Scrollbar (for better look) */
.notes-list::-webkit-scrollbar {
  width: 6px;
}

.notes-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.notes-list::-webkit-scrollbar-track {
  background-color: transparent;
}

.note-item {
  padding: 0.75rem;
  min-height: 100px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: scaleIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: -50px;
  z-index: 1; 
}


.note-item:first-child {
  margin-top: 0; 
}

.note-item-content {
  font-size: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-item-delete {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  padding: 0.25rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.notes-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notes-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  resize: vertical;
}

.note-colors {
  display: flex;
  gap: 0.5rem;
}

.color-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
}

.notes-form button {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
}
  
  /* Modal styles */
 /* Note Modal Popup */
/* Modal Background */
.note-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

/* Modal Container */
.note-modal-content {
  background: rgb(255, 255, 255);
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  height: 80%;
  max-width: 800px; /* Adjust for responsiveness */
  max-height: 90vh; /* Ensures it doesn't exceed screen height */
  overflow-y: auto; /* Enables scrolling */
  position: relative;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}


/* Close Button */
.note-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.note-modal-close:hover {
  color: red;
}





/* TUTORIAL */
.tutorial-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.tutorial-modal.active {
  display: flex;
}

.tutorial-content {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  padding: 20px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tutorial-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.tutorial-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 36px;
}

.tutorial-slides {
  position: relative;
  min-height: 200px;
}

.tutorial-slide {
  display: none;
  text-align: center;
}

.tutorial-slide.active {
  display: block;
}

.tutorial-slide h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.tutorial-slide p {
  font-size: 16px;
  margin-bottom: 20px;
}

.tutorial-placeholder {
  background: #ffffff;
  height: 100px;
  line-height: 100px;
  color: #666;
  font-size: 14px;
}

.tutorial-carousel {
  position: relative;
  overflow: hidden;
  height: 300px; 
  border-radius: 20px;
  margin-top: 10px;
}

.carousel-item {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 150px; /* Adjust to center content vertically */
  background: #f0f0f0;
  color: #666;
  font-size: 14px;
  transition: opacity 0.5s ease;
}

.carousel-item.active {
  display: block;
  opacity: 1;
}

.carousel-item img {
  width: 100%;  /* Make sure the image takes the full width of the container */
  height: 100%; /* Set height to 100% to fill the container */
  object-fit: contain; /* Ensure the whole image fits within the container */
  margin: 0 auto; /* Center the image horizontally */
}


.tutorial-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.tutorial-btn {
  background: var(--primary, #007bff);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.tutorial-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.tutorial-skip {
  display: block;
  margin: 10px auto 0;
  background: none;
  color: var(--primary, #007bff);
  border: 1px solid var(--primary, #007bff);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .tutorial-content {
    width: 95%;
    padding: 15px;
  }

  .tutorial-title {
    font-size: 20px;
  }

  .tutorial-slide h3 {
    font-size: 18px;
  }

  .tutorial-slide p {
    font-size: 14px;
  }

  .tutorial-carousel {
    height: 120px;
  }

  .carousel-item {
    line-height: 120px;
  }

  .tutorial-placeholder {
    height: 80px;
    line-height: 80px;
  }
}

#dashboard-name-input {
  padding: 8px;
  margin: 10px 0;
  width: 80%;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.tutorial-slide ul {
  list-style: disc;
  margin: 10px 0;
  padding-left: 20px;
}
.tutorial-slide li {
  margin-bottom: 8px;
}
