/* Basic styling for the reminder application.  The intent is to provide a
   clean and responsive layout without relying on any external CSS
   frameworks. */

html,
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

h1,
h2 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.auth-form,
.reminder-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background-color: #3b82f6;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #2563eb;
}

button.secondary {
  background-color: #ef4444;
}

button.secondary:hover {
  background-color: #dc2626;
}

.error {
  color: #dc2626;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}

.reminder-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.reminder-item.completed {
  background-color: #e5e7eb;
  text-decoration: line-through;
}

.reminder-text {
  flex-grow: 1;
}

.reminder-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

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

.reminder-confidence {
  color: #059669;
  font-weight: 500;
}

.reminder-status {
  color: #7c3aed;
  font-weight: 500;
}

.reminder-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.reminder-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reminder-item.completed {
  background-color: #f9fafb;
  opacity: 0.7;
}

.reminder-content {
  flex: 1;
}

/* Location Simulation Styles */
.location-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.location-btn:hover {
  border-color: #9ca3af;
  background-color: #f9fafb;
}

.location-btn.active {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.location-btn i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.location-name {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  font-size: 0.875rem;
}

.tab-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.tab-btn.active {
  background-color: #3b82f6;
  color: #ffffff;
}

.tab-btn i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.tab-btn span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Tab Content */
.tab-container {
  min-height: 400px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-card h2 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-card h2 i {
  color: #3b82f6;
}

.tab-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Voice Input */
.input-with-voice {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.voice-btn {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.voice-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.voice-btn.recording {
  background-color: #ef4444;
  color: white;
  animation: pulse 1.5s infinite;
}

.voice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-status {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideIn 0.2s ease;
}

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

.modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body p {
  margin: 0;
  color: #374151;
  line-height: 1.5;
}

.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: scale(0.9) translateY(-10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Button Styles */
.primary-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
}

.primary-btn:hover {
  background-color: #2563eb;
}

.secondary-btn {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.danger-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.danger-btn:hover {
  background-color: #dc2626;
}

/* Location Controls */
.location-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 500;
  color: #374151;
}

select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
}

.current-location-display {
  padding: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.simulation-controls {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* History Filters */
.history-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: #f9fafb;
}

.filter-btn.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* Settings */
.settings-section {
  margin-bottom: 2rem;
}

.settings-section h3 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-section h3 i {
  color: #3b82f6;
}

.setting-item {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Statistics Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3b82f6;
  color: white;
  border-radius: 8px;
  margin-right: 1rem;
}

.stat-icon i {
  font-size: 1.25rem;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Analytics */
.analytics-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.analytics-item {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.analytics-item h4 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
}

.category-list, .activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item, .activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: white;
  border-radius: 4px;
  font-size: 0.875rem;
}

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

.category-item .category-count {
  font-weight: 600;
  color: #3b82f6;
}

.activity-item {
  border-left: 3px solid #3b82f6;
}

.activity-item .activity-text {
  flex: 1;
}

.activity-item .activity-time {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  color: #374151;
}

.empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 640px) {
  .tab-navigation {
    padding: 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 0.25rem;
  }

  .tab-btn i {
    font-size: 1rem;
  }

  .tab-btn span {
    font-size: 0.7rem;
  }

  .tab-card {
    padding: 1rem;
  }

  .location-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .history-filters {
    flex-wrap: wrap;
  }
}
  margin-right: 0.5rem;
}

.reminder-actions {
  display: flex;
  gap: 0.25rem;
}

.reminder-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Enhanced reminder display */
.reminder-content {
  flex-grow: 1;
  margin-right: 0.5rem;
}

.reminder-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

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

.reminder-category i {
  font-size: 0.75rem;
}

.reminder-confidence {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Notification System Styles */
.notification-area {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  max-width: 400px;
  width: 100%;
}

.notification {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0.5rem;
  padding: 1rem;
  border-left: 4px solid #3b82f6;
  animation: slideIn 0.3s ease-out;
  transition: all 0.3s ease;
}

.notification.success {
  border-left-color: #10b981;
}

.notification.warning {
  border-left-color: #f59e0b;
}

.notification.error {
  border-left-color: #ef4444;
}

.notification.info {
  border-left-color: #3b82f6;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.notification-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

.notification-title i {
  font-size: 1rem;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.notification-body {
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.notification-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.notification-actions button {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  color: #374151;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.notification-actions button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.notification-actions button.btn-primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.notification-actions button.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.notification-actions button.btn-secondary {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
}

.notification-actions button.btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Parsing preview styles */
.parsing-preview {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background-color: #f3f4f6;
  border-radius: 4px;
  border-left: 4px solid #3b82f6;
}

.parsing-preview.hidden {
  display: none;
}

.parsing-result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.parsing-category {
  font-weight: 600;
  color: #1f2937;
}

.parsing-confidence {
  color: #6b7280;
  font-size: 0.75rem;
}

.parsing-icon {
  margin-right: 0.25rem;
}