@import url('./chat/chat.css');
@import url('./chat/conversation.css');
@import url('./chat/media.css');
@import url('./chat/album.css');

@import url('./app.css');
@import url('./login.css');

@font-face {
  font-family: 'Urbanist';
  src: url('/static/shared/fonts/Urbanist-Regular.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Urbanist';
  src: url('/static/shared/fonts/Urbanist-SemiBold.ttf') format('truetype');
  font-display: swap;
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Urbanist';
  src: url('/static/shared/fonts/Urbanist-Bold.ttf') format('truetype');
  font-display: swap;
  font-weight: 700;
  font-style: normal;
}

:root {
  /* Colors */
  --color-primary: #1a1a1a;
  --color-secondary: #666;
  --color-background: #f5f5f3;
  --color-surface: #b5d4f4;
  --color-surface-raised: #f0f0f5;       /* cards, modals sitting above surface */
  --color-accent: #7c1182;
  --color-accent-dark: #5a0c5e;          /* pressed/hover state for accent */
  --color-accent-muted: #f3e5f5;         /* accent tints, avatar bg, badges */
  --color-text-main: #1c1c1e;
  --color-text-muted: #8e8e93;
  --color-text-on-accent: #ffffff;       /* text/icons sitting ON accent bg */
  --color-border: #d1d1d6;
  --color-border-strong: #a0a0a8;        /* emphasized borders, focused inputs */
  --color-danger: #d32f2f;               /* errors, destructive actions */
  --color-danger-muted: #fdecea;         /* danger tint backgrounds */
  --color-success: #2e7d32;             /* confirmations, sent indicators */
  --color-success-muted: #e8f5e9;        /* success tint backgrounds */

  /* Typography */
  --font-primary: 'Urbanist', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.8rem;                /* timestamps, captions */
  --font-size-md: 0.95rem;              /* body, list items */
  --font-size-lg: 1.1rem;               /* subheadings */
  --font-size-xl: 1.6rem;               /* page titles */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --line-height-tight: 1.2;             /* headings */
  --line-height-base: 1.5;              /* body text */

  /* Spacing */
  --spacing-xs: 0.25rem;                /* tight gaps */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;                  /* section gaps */

  /* Border */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;             /* modals, sheets */
  --border-radius-full: 999px;          /* pills, avatars */
  --border: 0.5px solid rgba(0, 0, 0, 0.12);
  --border-focus: 2px solid var(--color-accent); /* focused input ring */

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);         /* subtle card lift */
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);         /* modals, dropdowns */
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);         /* bottom sheets */

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;

  /* Layout */
  --bar-height: 3rem;
  --bar-bg: #b7d4f0;
  --content-max-width: 480px;           /* max width for chat on desktop */

  /* Opacity */
  --opacity-disabled: 0.4;
}

:root {
  /* ── Sent bubble ───────────────────────────── */
  --color-bubble-sent-bg:       #5a0c5e;   /* accent-dark — deep, high contrast */
  --color-bubble-sent-text:     #f3e5f5;   /* accent-muted — soft lavender on dark purple */

  /* ── Received bubble ───────────────────────── */
  --color-bubble-recv-bg:       #ffffff;   /* pure white — max contrast */
  --color-bubble-recv-text:     #1c1c1e;   /* text-main */

  /* ── Avatars ───────────────────────────────── */
  --color-avatar-me-bg:         #f3e5f5;
  --color-avatar-me-text:       #5a0c5e;
  --color-avatar-them-bg:       #E1F5EE;
  --color-avatar-them-text:     #0F6E56;

  /* ── File chips ────────────────────────────── */
  --color-file-image-bg:        #f3e5f5;   /* purple — accent-muted */
  --color-file-image-text:      #5a0c5e;
  --color-file-doc-bg:          #E6F1FB;   /* blue */
  --color-file-doc-text:        #185FA5;
  --color-file-archive-bg:      #FAEEDA;   /* amber */
  --color-file-archive-text:    #854F0B;

  /* ── Message status ────────────────────────── */
  --color-status-delivered-bg:  #E1F5EE;
  --color-status-delivered-text:#0F6E56;
  --color-status-read-bg:       #f3e5f5;
  --color-status-read-text:     #5a0c5e;
  --color-status-failed-bg:     #fdecea;
  --color-status-failed-text:   #d32f2f;

  /* ── Message timestamps ────────────────────────────── */
  --color-msg-time:   #8e8e93;   /* = color-text-muted — same for both sides */

  /* ── Presence ──────────────────────────────── */
  --color-online:               #22c55e;
  --color-online-glow:          rgba(34, 197, 94, 0.2);
  --color-offline:              #8e8e93;   /* text-muted — neutral grey */
}

/* @layer theme {
  :root {
    --font-sans: 'Urbanist', ui-sans-serif, system-ui, sans-serif;
  }
} */

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background: var(--color-background);
  color: var(--color-text-main);
}

/* err container */ 

/* ERROR CONTAINER */

#error-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;

    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    max-width: 400px;
    width: 100%;

    pointer-events: none;
}

.error-toast {
    display: flex;
    justify-content: space-between;
    pointer-events: auto;

    padding: 0.75rem 1rem;
    border-radius: 6px;

    background: #dc2626;
    color: white;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

