@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css");
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&family=Lora:wght@300;400&display=swap");

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* Prevent body/html from scrolling - only message-list should scroll */
  font-family: "Roboto", sans-serif; /* Set Roboto as the default font */
}

/* Make FontAwesome icons less bold and more professional */
i[class^="fa-"],
i[class*=" fa-"] {
  font-weight: 300 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Regular style icons - lighter appearance */
i[class*=" far "],
i[class^="far "] {
  font-weight: 300 !important;
}


:root {
  /* Font sizes */
  --font-size-small: 12px;
  --font-size-medium: 14px;
  --font-size-large: 16px;
  --font-size-title: 20px;

  /* Icon sizes */
  --icon-size-small: 16px;
  --icon-size-medium: 24px;
  --icon-size-large: 32px;

  /* Orange theme colors */
  --color-orange-primary: #FF5722;
  --color-orange-secondary: #FF7043;
  --color-orange-light: #FF8A65;
  --color-orange-dark: #E64A19;
  --color-orange-accent: #FF5722;
  --color-orange-border: rgba(255, 87, 34, 0.5);
  --color-orange-border-light: rgba(255, 87, 34, 0.3);
  --color-orange-hover: rgba(255, 87, 34, 0.1);
  --color-orange-active: rgba(255, 87, 34, 0.2);

  /* Background colors */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F6F6F6;
  --color-bg-tertiary: #F1F1F1;
  --color-bg-light: #FAFAFA;
  --color-bg-dark: #333333;
  --color-bg-glass: rgba(255, 255, 255, 0.82);
  --color-bg-overlay: rgba(0, 0, 0, 0.8);
  --color-bg-hover: rgba(211, 211, 211, 0.5);
  --color-bg-active: rgba(169, 169, 169, 0.5);
  --color-bg-disabled: #F0F0F0;

  /* Text colors */
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-tertiary: #999999;
  --color-text-light: #CCCCCC;
  --color-text-white: #FFFFFF;
  --color-text-dark: #000000;
  --color-text-link: #00A3E0;
  --color-text-link-hover: #0088C0;
  --color-text-error: #84212B;
  --color-text-success: #2E7D32;
  --color-text-warning: #F57C00;
  --color-text-info: #1976D2;
  
  /* Status colors for UI elements */
  --color-success: #2E7D32;
  --color-warning: #F57C00;
  --color-info: #1976D2;

  /* Border colors */
  --color-border-primary: #979797;
  --color-border-secondary: #D1D5DB;
  --color-border-light: #E0E0E0;
  --color-border-dark: #333333;
  --color-border-disabled: #CCCCCC;
  --color-border-orange: rgba(255, 87, 34, 0.5);

  /* Border styles */
  --border-width-thin: 0.5px;
  --border-width-normal: 1px;
  --border-width-medium: 1.5px;
  --border-width-thick: 2px;
  --border-radius-small: 3px;
  --border-radius-medium: 8px;
  --border-radius-large: 12px;
  --border-radius-round: 50%;

  /* Spacing */
  --spacing-xxs: 1px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-xxl: 24px;
  --spacing-xxxl: 30px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-dropdown: 0 1px 4px rgba(0, 0, 0, 0.15);
  --shadow-modal: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.1s linear;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-slow-in-out: 0.3s ease-in-out;

  /* Z-index layers */
  --z-index-base: 100;
  --z-index-dropdown: 1000;
  --z-index-modal: 1000;
  --z-index-overlay: 110;
  --z-index-toast: 10000;
}

/* Dark mode */
[data-theme="dark"] {
  /* Background colors - dark mode - darker and more professional */
  --color-bg-primary: #0f0f0f;
  --color-bg-secondary: #1a1a1a;
  --color-bg-tertiary: #242424;
  --color-bg-light: #151515;
  --color-bg-glass: rgba(15, 15, 15, 0.9);
  --color-bg-overlay: rgba(0, 0, 0, 0.95);
  --color-bg-hover: rgba(255, 255, 255, 0.04);
  --color-bg-active: rgba(255, 255, 255, 0.06);
  --color-bg-disabled: #1a1a1a;

  /* Text colors - dark mode - refined for better contrast */
  --color-text-primary: #e8e8e8;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #707070;
  --color-text-light: #505050;
  --color-text-dark: #ffffff;
  --color-text-link: #4fc3f7;
  --color-text-link-hover: #29b6f6;
  --color-text-error: #ef5350;
  --color-text-success: #66bb6a;
  --color-text-warning: #ffb74d;
  --color-text-info: #64b5f6;
  
  /* Status colors for UI elements - dark mode */
  --color-success: #66bb6a;
  --color-warning: #ffb74d;
  --color-info: #64b5f6;

  /* Border colors - dark mode - more subtle and professional */
  --color-border-primary: rgba(255, 255, 255, 0.12);
  --color-border-secondary: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.06);
  --color-border-disabled: rgba(255, 255, 255, 0.1);
  --color-border-orange: rgba(230, 74, 25, 0.5);
  
  /* Orange border - darker for dark mode to match header */
  --color-orange-border: rgba(230, 74, 25, 0.5);
  --color-orange-border-light: rgba(230, 74, 25, 0.25);
  
  /* Input field border for dark mode */
  --input-border-color: rgba(255, 255, 255, 0.15);
  --input-border-shadow: rgba(255, 255, 255, 0.08);

  /* Shadows - dark mode */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-dropdown: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 4px 6px rgba(0, 0, 0, 0.5);

  /* Scrollbar - track matches dark bg, visible thumb */
  scrollbar-color: var(--color-border-primary) var(--color-bg-primary);
}

/* Body background for dark mode */
[data-theme="dark"] body,
[data-theme="dark"] html {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* Global scrollbar: track matches page background (no visible strip), theme-aware thumb.
   Chrome does not support transparent track; use bg color so track blends in. */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-light) var(--color-bg-primary);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-border-light);
  border-radius: var(--border-radius-small);
  transition: background-color var(--transition-normal);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-border-primary);
}

[data-theme="dark"] {
  scrollbar-color: var(--color-border-primary) var(--color-bg-primary);
}

[data-theme="dark"] *::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background-color: var(--color-border-primary);
}

[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-border-secondary);
}

/* Extra small devices (max-width: 480px, small phones) */
@media (max-width: 480px) {
  :root {
    --font-size-small: 11px;
    --font-size-medium: 15px; /* Increased from 10px for better readability */
    --font-size-large: 17px; /* Increased from 12px */
    --font-size-title: 18px; /* Increased from 14px */

    --icon-size-small: 10px;
    --icon-size-medium: 18px;
    --icon-size-large: 24px;
  }
}

/* Small devices (481px to 768px, typical smartphones) */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --font-size-small: 12px;
    --font-size-medium: 16px; /* Increased from 12px for better readability */
    --font-size-large: 18px; /* Increased from 14px */
    --font-size-title: 20px; /* Increased from 18px */

    --icon-size-small: 12px;
    --icon-size-medium: 20px;
    --icon-size-large: 28px;
  }
}

/* Desktop and larger: allow body to scroll normally */
@media (min-width: 769px) {
  body,
  html {
    overflow: auto;
    height: auto;
  }
}

/* Medium devices (769px to 1024px, tablets and small laptops) */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --font-size-small: 11px;
    --font-size-medium: 13px;
    --font-size-large: 15px;
    --font-size-title: 19px;

    --icon-size-small: 14px;
    --icon-size-medium: 22px;
    --icon-size-large: 30px;
  }
}

/* Large devices (1025px to 1440px, laptops and standard desktops) */
@media (min-width: 1025px) and (max-width: 1440px) {
  :root {
    --font-size-small: 12px;
    --font-size-medium: 14px;
    --font-size-large: 16px;
    --font-size-title: 20px;

    --icon-size-small: 16px;
    --icon-size-medium: 24px;
    --icon-size-large: 32px;
  }
}

/* Extra-large devices (1441px to 2560px, including 2K and 1440p monitors) */
@media (min-width: 1441px) and (max-width: 2560px) {
  :root {
    --font-size-small: 14px;
    --font-size-medium: 16px;
    --font-size-large: 18px;
    --font-size-title: 24px;

    --icon-size-small: 18px;
    --icon-size-medium: 28px;
    --icon-size-large: 36px;
  }
}

/* 4K and ultra-wide monitors (2561px and above) */
@media (min-width: 2561px) {
  :root {
    --font-size-small: 16px;
    --font-size-medium: 18px;
    --font-size-large: 20px;
    --font-size-title: 28px;

    --icon-size-small: 20px;
    --icon-size-medium: 32px;
    --icon-size-large: 40px;
  }
}
