/* Base css for my website */

/* Dark Mode Variables */
:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --box-bg: #181818;
  --input-bg: #1a1a1a;
  --border-color: #333;
  --accent-color: #40f;
  --accent-hover: #30d;
  --link-color: #2bbdf6; 
  --theme-pure: 255, 255, 255;
}

/* Light Mode Variables */
body.light-mode {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --box-bg: #f0f0f0;
  --input-bg: #ffffff;
  --border-color: #ccc;
  --accent-color: #007bff;
  --accent-hover: #0056b3;
  --link-color: #0b92c1; 
  --theme-pure: 0, 0, 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center; /* This centers all children */
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  box-sizing: border-box;
}

h1 {
  color: var(--theme-pure);
}

h2 {
  color: var(--text-color);
}

a {
  color: var(--link-color);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

a:hover {
  text-decoration: underline;
}

details {
  background-color: var(--box-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0;
  overflow: hidden;
  transition: background-color 0.3s, border-color 0.3s; 
}

summary, details .content {
  transition: background-color 0.3s, color 0.3s;
}

.no-transition, 
.no-transition *, 
.no-transition *::after, 
.no-transition *::before {
  transition: none !important;
}

summary {
  padding: 1rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
  transition: background-color 0.2s;
}

summary::after {
  content: '+';
  font-family: monospace;
  font-size: 1.2rem;
  color: var(--theme-pure);
}

details[open] summary::after {
  content: '-';
}

summary:hover {
  background-color: rgba(var(--theme-pure), 0.05);
  transition: background-color 0.2s;
}

details .content {
  padding: 0 1rem 1rem 1rem;
  line-height: 1.6;
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
}

textarea {
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 15px;
  width: 100%;
  box-sizing: border-box;
  height: 15vh;
  resize: none;
}

input {
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 1vh;
  width: 100%;
  height: 6vh;
  box-sizing: border-box;
  font-size: 2vh;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

button {
  background-color: var(--accent-color);
  color: #fff;
  border: 1px solid var(--border-color);
  width: auto;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
  padding: 0 100px;
  transition: background 0.3s;
}

button:hover {
  background-color: var(--accent-hover);
}

#messageForm {
  width: 100%;
  display: flex;
  justify-content: center;
}

#inputs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  width: 100%;
  max-width: 1200px;
  position: relative;
}

#inputs button {
  width: 100%;
  box-sizing: border-box;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1vh;
  width: 100%;
}

#theme-toggle {
  font-size: 20px;
  width: auto;
  height: 50px;
  padding: 0 15px;
}

.no-transition {
  transition: none !important;
}
