/* Importar estilos de los componentes */

@import url('./components/topbar.css');
@import url('./components/cards.css');
@import url('./components/card-list.css');
@import url('./components/modals.css');
@import url('./components/buttons.css');
@import url('./components/alerts.css');
@import url('./components/sidebar.css');
@import url('./components/login.css');
@import url('./components/dashboard.css');

/* Importar fuente */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* CSS reset basado en https://piccalil.li/blog/a-modern-css-reset/ */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--font-family-base);
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'],
ul, ol {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  width: 100%;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Fin del reset CSS */

/* Estilos globales para LaButxaka */

:root {

  /* Definición de variables CSS de LaButxaka */
  /* Colores */
  --color-primary: #38803A;
  --color-primary-1: #EDF7ED;
  --color-primary-2: #275928;
  --color-primary-3: #081208;
  --color-secondary: #FBBF24;
  --color-secondary-1: #FFF8E6;
  --color-secondary-2: #7D5B02;
  --color-secondary-3: #191200;
  --color-tertiary: #5386E4;
  --color-tertiary-1: #E9EFFC;
  --color-tertiary-2: #11326E;
  --color-tertiary-3: #030A16;
  --color-orange: #EB8031;
  --color-red: #E94220;
  --color-white: #FBFBFB;
  --color-gray: #576158;
  --color-gray-1: #F2F3F2;
  --color-gray-2: #3C433D;
  --color-black: #0C0D0C;
  --color-lilac: #80387D;

  /* Tipografía */
  --font-family-base: 'Inter', sans-serif;
  --font-size-base: 12px;
  --font-size-xs: 10px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Reemplazo de Shoelace */
  --sl-color-primary-500: var(--color-primary);
  --sl-color-primary-600: var(--color-primary-2);
  --sl-color-primary-700: var(--color-primary-2);
  --sl-color-secondary-500: var(--color-secondary);
  --sl-color-secondary-600: var(--color-secondary-2);
}

.layout { 
  display: grid; 
  grid-template-columns: 260px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
  " sidebar header"
  " sidebar main ";
  min-height: 100vh; 
  background-color: var(--color-primary-1);
  width: 100%;
}

header.layout-topbar {
  grid-area: header;
  padding: 60px;
}

aside.layout-sidebar {
  grid-area: sidebar;
  min-height: 100vh;
}

main.layout-content { 
  grid-area: main;
  padding: 30px 60px; 
}

header.layout-topbar,
main.layout-content {
  min-width: 0;
}

body#categorias main.layout-content ul,
body#cuentas main.layout-content ul { 
  margin-top: 20px;
  padding-left: 10px;
}

body#categorias main.layout-content ul li,
body#cuentas main.layout-content ul li {
  margin-bottom: 10px;
}

.font-weight-bold { font-weight: var(--font-weight-bold); }
.font-size-extra-lg { font-size: var(--font-size-2xl); } 

.content { padding: 16px; }
.movimientos-container { max-width: 100%; margin: 20px auto; }

h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-2);
}

p.no-data-message {
  font-size: var(--font-size-xl);
  color: var(--color-primary-2);
  text-align: center;
  margin-top: 50px;
}

.only-deskotp { display: inline-block; }

@media (max-width: 1024px) {
  main.layout-content {
    padding: 20px 30px;
  }
}

@media (max-width: 768px) {
  aside.layout-sidebar { display: none; }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main";
    min-height: 100vh;
    padding: 0;
  }

  header.layout-topbar {
    padding: 20px;
    background-color: var(--color-primary);
  }

  main.layout-content {
    padding: 20px;
    width: 100%;
  }

  body#cuentas-index main.layout-content,
  body#categorias-index main.layout-content { 
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .only-desktop { display: none; }
}