/* global.css */

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  position: relative;
  width: 100%;
  height: 100%;
}

[data-theme="dark"] {
  --background-color: #333333;
  --text-color: #ffffff;
  --button-background-color: #444444;
  --button-text-color: #ffffff;
  --button-hover-background-color: #007bff;
  --button-hover-text-color: #ffffff;
  --table-background-color: #444444;
  --table-border-color: #666666;
  --table-header-background-color: #555555;
  --header-text-color: #ffffff;
}

/* Define light theme variables */
:root {
  --background-color: #f7f7f6;
  --background-color-section: #666666;
  --background-color-subsection: #c2c2c2;
  --text-color: #333;
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --link-color: rgb(0, 100, 200);
  --link-hover-color: rgb(0, 80, 160);
  --header-bg-color: #fff;
  --header-text-color: #333;
  --button-bg-color: #f4f4f4;
  --button-text-color: #333;
  --button-disabled-color: #999;
  --button-active-bg-color: #ddd;
  --button-focus-border-color: #666;
  --button-hover-background-color: #cdcbcb;
  --button-hover-text-color: #ffffff;
  /* Example color */
  --border-color: #ccc;
  --thead-bg-color: #f0f0f0;
  --tooltip-bg-color: #f9f9f9;
  --tooltip-text-color: #000000;
  --grid-line-color: #e0e0e0;
  --special-note-bg-color: beige;
  --special-note-text-color: black;
  --table-border-color: #1f1f1f;
  --input-background-color: white;
  --input-readonly-background-color: rgb(202, 202, 202);
  --table-header-background-color: rgba(224, 224, 224);

  /* Light mode color */
}

/* Define dark theme variables */
:root.dark-mode {
  --background-color: #121212;
  --background-color-section: #030202;
  --background-color-subsection: #4b4b4b;
  --text-color: #e0e0e0;
  --primary-color: #1a73e8;
  --secondary-color: #b0bec5;
  --link-color: #8ab4f8;
  --link-hover-color: #4b8bf5;
  --header-bg-color: #1f1f1f;
  --header-text-color: #e0e0e0;
  --button-bg-color: #333;
  --button-text-color: #e0e0e0;
  --button-disabled-color: #555;
  --button-active-bg-color: #444;
  --button-focus-border-color: #888;
  --button-hover-background-color: #e4e4e4;
  --button-hover-text-color: #ffffff;
  /* Example color */
  --tooltip-bg-color: #333333;
  --tooltip-text-color: #ffffff;
  --grid-line-color: #444444;
  --special-note-bg-color: #878481a3;
  --special-note-text-color: white;
  --table-border-color: #edebeb;
  --input-background-color: rgb(52, 48, 48);
  --input-readonly-background-color: black;
  --table-header-background-color: #444343;

  /* Dark mode color */
}

/* Apply the variables to the body */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 8px;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}

a:visited {
  color: var(--link-hover-color);
}

label {
  display: block;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  padding: 0.4em;
  margin: 0 0 0.5em 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 2px;
}

input:disabled {
  color: #ccc;
}

button {
  color: var(--button-text-color);
  background-color: var(--button-bg-color);
  outline: none;
}

button:disabled {
  color: var(--button-disabled-color);
}

button:not(:disabled):active {
  background-color: var(--button-active-bg-color);
}

button:focus {
  border-color: var(--button-focus-border-color);
}

/* Header Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
}

h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

h2 {
  font-size: 1.6rem;
  color: var(--secondary-color);
}

h3,
h4 {
  font-size: 1.4rem;
  color: var(--text-color);
}

h4 {
  text-align: center;
  border-radius: 4px 0 4px 0;
  border-color: #030303;
  background-color: #666;
  color: papayawhip;
  padding: 0.2rem;
  z-index: 2000;
}

/* Utility Classes for Spacing */
.mb-1 {
  margin-bottom: 0.2rem;
}

.mb-2 {
  margin-bottom: 0.2rem;
}

.pb-1 {
  padding-bottom: 0.2rem;
}

.pb-2 {
  padding-bottom: 0.2rem;
}

/* Additional Styling */
.header-container {
  padding: 0.2rem;
  background-color: var(--header-bg-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.2rem;
}

.header-container h1,
.header-container h2,
.header-container h3,
.header-container h4,
.header-container h5,
.header-container h6 {
  margin-bottom: 0.2rem;
}

.header-container p {
  margin-bottom: 0.1rem;
  color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .header-container {
    padding: 1rem;
  }
}
