@import url('./reset.css');
@import url('./variables.css');
@layer base, layout, components, utilities;

/* Base layer - element defaults */
@layer base {
  body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family:
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      Roboto,
      Oxygen,
      Ubuntu,
      Cantarell,
      'Open Sans',
      'Helvetica Neue',
      sans-serif;
  }
  button {
    font-family: inherit;
    cursor: pointer;
  }
}

/* Layout */
@layer layout {
  .container {
    width: 95%;
    max-width: 600px;
    margin-inline: auto;
  }
}

/* Max section */
@layer components.max {
  .max {
    margin-bottom: 1rem;
    h4 {
      margin-bottom: 0.5rem;
    }
    .temperature {
      font-weight: bold;
      color: red;
    }
  }
}

/* Card component */
@layer components.card {
  .card {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    background: var(--card-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    .timestamp {
      font-size: 1.15rem;
      font-weight: bold;
    }
    .metadata {
      margin-left: auto;
      text-align: right;
      span {
        display: inline-block;
        padding: 0 0.25rem;
        &:last-child {
          padding-right: 0;
        }
      }
      .temperature {
        font-size: 2rem;
        font-weight: bold;
      }
    }
  }
}

/* Button component */
@layer components.button {
  .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
  }
}

/* Utilities layer - highest priority */
@layer utilities {
  .text-center {
    text-align: center;
  }
  .flex {
    display: flex;
  }
  .flex-col {
    flex-direction: column;
  }
  .items-center {
    align-items: center;
  }
  .gap-0 {
    gap: 0;
  }
  .gap-1 {
    gap: 0.25rem;
  } /* 4px */
  .gap-2 {
    gap: 0.5rem;
  } /* 8px */
  .gap-3 {
    gap: 0.75rem;
  } /* 12px */
  .gap-4 {
    gap: 1rem;
  } /* 16px */
  .gap-5 {
    gap: 1.25rem;
  } /* 20px */
  .gap-6 {
    gap: 1.5rem;
  } /* 24px */
  .gap-8 {
    gap: 2rem;
  } /* 32px */
  .gap-10 {
    gap: 2.5rem;
  } /* 40px */
  .gap-12 {
    gap: 3rem;
  } /* 48px */
  .gap-16 {
    gap: 4rem;
  } /* 64px */
}
