/* Basic styling for the travel checklist PWA */

/* Reset margin and box sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  background-color: #0a122d;
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  border-bottom: 1px solid #374151;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.header-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

@media (min-width: 768px) {
  #app {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Category container */
.category {
  background-color: #0f1937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Color themes for categories */
.red-header { background-color: #6e0d25; }
.red-badge { background-color: #c53030; }

.blue-header { background-color: #122e59; }
.blue-badge { background-color: #2563eb; }

.green-header { background-color: #064e3b; }
.green-badge { background-color: #059669; }

.orange-header { background-color: #4f1d2c; }
.orange-badge { background-color: #d97706; }

/* Tasks container */
.tasks {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
}

/* Task card */
.task-card {
  background-color: #142145;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-btn {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid #4b5563;
  flex-shrink: 0;
}

.status-complete {
  border-color: #10b981;
  background-color: #10b981;
}

.task-title {
  font-weight: 600;
}

.task-desc {
  font-size: 0.875rem;
  color: #9ca3af;
}

.delete-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.delete-btn:hover svg {
  color: #dc2626;
}

.avatars {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: black;
}

/* Avatar color utility classes (approximate Tailwind colors) */
.bg-pink-500 { background-color: #ec4899; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-yellow-500 { background-color: #f59e0b; }
.bg-green-500 { background-color: #10b981; }

/* Add card */
.add-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  border: 2px dashed #4b5563;
  border-radius: 0.5rem;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.add-card:hover {
  background-color: #192553;
  border-color: #6b7280;
}

/* Floating Add Revision button */
#addRevisionBtn {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f97316;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#addRevisionBtn:hover {
  background-color: #ea580c;
}

/* Modal styling */
#taskModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#taskModal.flex {
  display: flex;
}

#taskModal .modal-content {
  background-color: #0f1937;
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  width: 100%;
  max-width: 24rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#taskModal h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

#taskModal label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

#taskModal input[type='text'],
#taskModal textarea {
  width: 100%;
  padding: 0.5rem;
  background-color: #142145;
  border: 1px solid #374151;
  border-radius: 0.25rem;
  color: #e5e7eb;
  font-size: 0.875rem;
}

#taskModal textarea {
  resize: vertical;
  min-height: 4rem;
}

#taskModal input[type='checkbox'] {
  accent-color: #2563eb;
}

#taskModal .traveller-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

#taskModal .button-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

#taskModal button {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

#taskModal #cancelBtn {
  background-color: #4b5563;
  color: white;
  transition: background-color 0.2s ease;
}

#taskModal #cancelBtn:hover {
  background-color: #6b7280;
}

#taskModal button[type='submit'] {
  background-color: #2563eb;
  color: white;
  transition: background-color 0.2s ease;
}

#taskModal button[type='submit']:hover {
  background-color: #1d4ed8;
}