/* MedMe - Notion UI Styles */

/* Lato font import */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

/* Notion color variables - exact matches */
:root {
  --notion-bg: #ffffff;
  --notion-sidebar: #f7f6f3;
  --notion-border: #e9e9e7;
  --notion-text: #37352f;
  --notion-text-secondary: #787774;
  --notion-hover: #f1f1ef;
  --notion-selected: #e9e9e7;
  --notion-blue: #2383e2;
  --notion-red: #e16259;
}

/* Base typography - Lato font */
* {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Minimal transitions - Notion style (very subtle) */
* {
  transition-property: color, background-color, border-color, opacity;
  transition-duration: 20ms;
  transition-timing-function: ease-in;
}

/* Remove transforms and heavy animations for Notion feel */
button:hover:not(:disabled),
a[role="button"]:hover {
  transform: none;
  box-shadow: none;
}

/* Notion-like button styles */
.notion-button {
  color: var(--notion-text);
  border-radius: 3px;
  transition: background-color 20ms ease-in;
  border: none;
  background: transparent;
  cursor: pointer;
}

.notion-button:hover {
  background-color: var(--notion-hover);
}

.notion-button.active {
  background-color: var(--notion-selected);
}

/* Notion-like input fields */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  transition: border-color 20ms ease-in;
  border: 1px solid var(--notion-border);
  border-radius: 3px;
  color: var(--notion-text);
  font-size: 14px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--notion-text);
  box-shadow: none;
  transform: none;
  outline: none;
}

/* Notion-like card */
.notion-card {
  background: white;
  border: 1px solid var(--notion-border);
  border-radius: 3px;
  transition: background-color 20ms ease-in;
}

.notion-card:hover {
  background-color: var(--notion-sidebar);
}

/* Card hover effects - very subtle */
.card-hover {
  transition: background-color 20ms ease-in;
}

.card-hover:hover {
  transform: none;
  box-shadow: none;
  background-color: var(--notion-hover);
}

/* Smooth tab transitions - minimal */
.tab-content {
  animation: fadeIn 150ms ease-in-out;
}

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

/* Loading spinner - Notion style */
.spinner {
  border: 2px solid var(--notion-border);
  border-top-color: var(--notion-blue);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton loading - Notion style */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--notion-sidebar) 0%,
    var(--notion-hover) 50%,
    var(--notion-sidebar) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 3px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Chat message animations - subtle */
.chat-message {
  animation: slideInMessage 150ms ease-out;
}

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

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--notion-text-secondary);
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Word-by-word fade-in animation */
.word-fade-in {
  opacity: 0;
  animation: wordFadeIn 0.4s ease-out forwards;
  display: inline-block;
}

@keyframes wordFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Preserve line breaks in word animation */
.word-container {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

/* Remove all shadows for Notion style */
.shadow-soft,
.shadow-medium,
.shadow-strong {
  box-shadow: none;
}

/* Smooth page transitions */
.page-transition {
  animation: pageFadeIn 200ms ease-out;
}

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

/* Notion-style scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--notion-border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--notion-text-secondary);
}

/* Better text selection - Notion style */
::selection {
  background-color: rgba(35, 131, 226, 0.2);
  color: var(--notion-text);
}

/* Disabled state styling */
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Remove icon hover transforms */
.icon-hover {
  transition: none;
}

.icon-hover:hover {
  transform: none;
}

/* Smooth opacity transitions */
.fade-in {
  animation: fadeIn 150ms ease-in;
}

.fade-out {
  animation: fadeOut 150ms ease-out;
}

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

/* Focus states - Notion style */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--notion-blue);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}