/* ===========================================
   CSS CUSTOM PROPERTIES
   =========================================== */

:root {
  --bg-light: #f0f0f0;
  --bg-white: #ffffff;
  --bg-dark: #444444;
  --border-gray: #cccccc;
  --text-dark: #333333;
  --scale-height: 440px;
}

/* ===========================================
   RESET STYLES
   =========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* ===========================================
   BASE STYLES
   =========================================== */

body {
  font-family: "Droid Sans Mono", "Roboto Mono", "Consolas", monospace;
  background-color: lightblue;
  color: var(--text-dark);
  display: flex;
  min-height: 100vh;
  padding: 1rem;
}

/* ===========================================
LAYOUT - FLEX CONTAINER
=========================================== */

.main-container {
  margin: auto;
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

/* Responsive breakpoint need to fix******** */
@media (min-width: 768px) {
}

.col-one-container {
  display: flex;
  flex-direction: column;
}

.col-two-container {
  display: flex;
  flex-direction: column;
}

.col-three-container {
  display: unset;
}

.quiz-container {
  /* max-width: 600px;
  min-width: 400px; */
  width: 512px;
}

/* ===========================================
   METER/PROVER CONTAINERS AND LABELS
   =========================================== */

.meter {
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23),
    inset 0 1px 1px rgba(0, 0, 0, 0.25),
    inset 0 -1px 1px rgba(255, 255, 255, 0.7);
}

.meter-label {
  font-size: 0.825rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-dark);
}

/* Specific container layouts */
.volume-meter {
  padding: 2rem;
  min-width: 280px;
  background-color: lightcoral;
  border: 2px solid coral;
}

.volume-prover {
  padding: 2rem;
  /* min-width: 280px; */
  background-color: lightgray;
  border: 2px solid gray;
}

.temperature-meter {
  padding: 1rem;
  min-width: 150px;
  position: relative;
  background-color: lightyellow;
  border: 2px solid yellow;
}

.temperature-meter:first-child {
  left: -1.5rem;
  top: 1rem;
}

.temperature-meter:last-child {
  left: 1.5rem;
  top: 12rem;
}

/* ===========================================
   LCD DISPLAY COMPONENTS
   =========================================== */

/* Common LCD styles */
.lcd-box {
  background-color: #e0e0e0;
  border: 1px solid #b0b0b0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.5rem 0 0;
  text-align: right;
  margin-bottom: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2),
    /* Dark inner shadow on the top/left */ inset 0 -2px 4px rgba(255, 255, 255, 0.7),
    /* Light inner shadow on the bottom/right */ inset 0 0 10px
      rgba(0, 0, 0, 0.1); /* Subtle overall inner glow */
}

.lcd-label {
  font-size: 0.875rem;
  color: var(--text-dark);
  text-transform: uppercase;
}

/* Volume displays */
.gross-vol-display,
.net-vol-display {
  min-width: 12rem;
  font-size: 2.5rem;
}

/* Temperature displays */
.meter-temp-display,
.prover-temp-display {
  min-width: 6rem;
  font-size: 1.5rem;
}

/* ===========================================
   SERIAL PLATE COMPONENT
   =========================================== */

.serial-plate {
  width: 90%;
  background-color: var(--bg-dark);
  color: var(--bg-white);
  border-radius: 0.25rem;
  padding: 1rem 1.4rem;
  margin: 2rem auto 0 auto;
  position: relative;
}

.volume-meter .serial-text {
  font-size: 0.875rem;
  white-space: pre-wrap;
  text-align: left;
}

.temperature-meter .serial-text {
  font-size: 0.625rem;
  white-space: pre-wrap;
  text-align: center;
}

.volume-prover .serial-text {
  font-size: 0.875rem;
  white-space: pre-wrap;
  text-align: center;
}

/* Rivet decorations */
[class^="rivet_"] {
  position: absolute;
  width: 0.4rem;
  height: 0.5rem;
  background-color: #777;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
}

.rivet_tl,
.rivet_tr {
  top: 0.5rem;
}
.rivet_bl,
.rivet_br {
  bottom: 0.5rem;
}
.rivet_tl,
.rivet_bl {
  left: 0.5rem;
}
.rivet_tr,
.rivet_br {
  right: 0.5rem;
}

/* ===========================================
   PROVER COMPONENTS
   =========================================== */

/* .col-three-container {
  display: flex;
  flex-direction: column;
} */

.sight-glass {
  position: relative;
  width: 160px;
  height: var(--scale-height);
}

.fluid-container {
  position: absolute;
  width: 60px;
  height: var(--scale-height);
  left: 11px;
  background: transparent;
  border: 3px solid #666;
  border-radius: 5px;
  z-index: 10;
}

.fluid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to right,
    rgba(74, 158, 255, 0.7),
    rgba(45, 125, 210, 0.7)
  );
  height: 0;
  transition: height 3s ease-out;
}

/* .tick {
  position: absolute;
  left: 0;
  width: 82px;
  height: 1px;
  background: black;
}

.tick.major {
  width: 90px;
  background: black;
  height: 2px;
} */

.tick {
  position: absolute;
  /* Use a transform to ensure integer pixel rendering */
  transform: translateX(0);
  width: 82px;
  height: 1px;
  background: black;
}

.tick.major {
  width: 90px;
  background: black;
  height: 2px;
}

.tick-label {
  position: absolute;
  left: 95px;
  font-size: 12px;
  color: black;
  transform: translateY(-50%);
  white-space: nowrap;
}

.meniscus {
  position: absolute;
  display: none;
  top: -25px;
  left: 0;
  right: 0;
  height: 25px;
  background: linear-gradient(
    to right,
    rgba(74, 158, 255, 0.7),
    rgba(45, 125, 210, 0.7)
  );
  mask-image: url(#ellipse-mask-svg);
  -webkit-mask-image: url(#ellipse-mask-svg);
}

/* ===========================================
   LAYOUT - QUIZ COMPONENTS
   =========================================== */

.card {
  border-radius: 1rem;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* Typography and Layout */
.quiz-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}
.question-container {
  margin-bottom: 2rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.question-heading {
  font-size: 1.25rem;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 1rem;
}

/* Input Fields */
.number-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  resize: vertical;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.radio-input {
  height: 1.25rem;
  width: 1.25rem;
  color: #2563eb;
}
.radio-text {
  color: #4b5563;
  font-weight: 400;
}

/* Buttons */
.btn {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}
.btn-blue {
  background-color: #3b82f6;
  color: #fff;
}
.btn-blue:hover {
  background-color: #2563eb;
}
.btn-green {
  background-color: #10b981;
  color: #fff;
}
.btn-green:hover {
  background-color: #059669;
}
.btn-gray {
  background-color: #e5e7eb;
  color: #4b5563;
}
.btn-gray:hover {
  background-color: #d1d5db;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Utility Classes */
.hidden {
  display: none !important;
}
.flex-between {
  display: flex;
  justify-content: space-between;
}
.text-center {
  text-align: center;
}

/* Feedback and Message Boxes */
.feedback {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
}
.feedback.correct {
  background-color: #d1fae5;
  color: #065f46;
}
.feedback.incorrect {
  background-color: #fee2e2;
  color: #991b1b;
}
.feedback-text {
  font-weight: 600;
}
.message-box {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  color: white;
  font-weight: 500;
}
.message-box.show {
  opacity: 1;
}
.bg-red-500 {
  background-color: #ef4444;
}
.bg-green-500 {
  background-color: #22c55e;
}
.end-quiz-message {
  font-size: 1.25rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
}

/* State */
.state-container {
  display: grid;
  gap: 0.5rem;
  width: 300px;
}

.state-item {
  display: flex;
  gap: 0.5rem;
}

.state-key {
  font-weight: bold;
  color: #333;
}

.state-value {
  color: #666;
}
.receipt {
  width: 300px;
  background: white;
  margin: 3rem auto;
  padding: 20px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Updated pseudo-elements for a sharper zigzag */
.receipt::before {
  content: "";
  position: absolute;
  top: -10px; /* Adjust top position to show the full zigzag */
  left: 0;
  width: 100%;
  height: 10px;
  background-image: linear-gradient(45deg, white 50%, transparent 50%),
    linear-gradient(-45deg, white 50%, transparent 50%);
  background-size: 10px 10px;
  background-repeat: repeat-x;
  background-position: 0 0, 10px 0;
}

.receipt::after {
  content: "";
  position: absolute;
  bottom: -10px; /* Adjust bottom position to show the full zigzag */
  left: 0;
  width: 100%;
  height: 10px;
  background-image: linear-gradient(45deg, transparent 50%, white 50%),
    linear-gradient(-45deg, transparent 50%, white 50%);
  background-size: 10px 10px;
  background-repeat: repeat-x;
  background-position: 0 0, 10px 0;
}

.receipt-text {
  font-size: 0.875rem;
  white-space: pre-wrap;
  /* text-align: left; */
}

.variable-text {
  /* color: #0066cc; */
  font-weight: bold;
}

.footer {
  position: fixed;
  bottom: 10px;
  right: 15px;
  font-size: 12px;
  color: #666;
  opacity: 0.7;
  font-family: Arial, sans-serif;
  z-index: 1000;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 5px;
}

code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid #ddd;
}
