/* css/stylenew.css */

/* ============
   Base Reset
   ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============
   Initial Screen Visibility
   ============ */
/* Show only the welcome screen on load */
#welcomeContainer {
  display: block;
}
#cameraContainer,
#recorderContainer,
#playbackContainer {
  display: none;
}

/* ============
   Color Palette (future accents)
   ============ */
:root {
  --platinum:        #E0E1DE;
  --lion:            #A88D6F;
  --cadet-gray:      #86A7A9;
  --battleship-gray: #808171;
  --khaki:           #B3AD97;
}

/* ============
   Typography & Layout
   ============ */
html, body {
  width: 100%;
  height: 100%;
}

body {
  background-color: #ffffff;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  line-height: 1.5;
  font-size: 1rem;
  padding: 1rem;
}

/* ===========
   Headings
   =========== */
h1 {
  font-size: 2rem;
  color: #000000;
  font-weight: 700;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.5rem;      /* adjust as needed */
  color: #000000;
  font-weight: 500;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

/* ============
   Text Elements
   ============ */
p, li, span, label {
  color: #333333;
  margin-bottom: 1em;
}

/* ============
   Links
   ============ */
a {
  color: #000000;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============
   Buttons
   ============ */
button {
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
button:hover,
button:focus {
  opacity: 0.85;
}

/* ============
   Form Inputs
   ============ */
input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: #333333;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5rem;
}

/* ============
   Utility Classes
   ============ */
.hidden       { display: none !important; }
.center       { text-align: center; }
.flex         { display: flex; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.mt-1         { margin-top: 1rem; }
.mb-1         { margin-bottom: 1rem; }
.p-1          { padding: 1rem; }

/* ============
   Camera Styles
   ============ */
.camera-container {
  /* hidden by default via initial screen visibility above */
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.camera-video {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 12px;
  object-fit: cover;
}

/* ============
   Recorder Styles
   ============ */
/* Preview of captured photo */
.snapshot-preview {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
}
#recorderContainer {
  /* hidden by default via initial screen visibility */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #000000;
  color: #ffffff;
  border: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.timer {
  font-size: 1.25rem;
  color: #333333;
  font-variant-numeric: tabular-nums;
}
progress {
  width: 80%;
  height: 1rem;
  accent-color: #333333;
}

/* ============
   Playback Styles
   ============ */
#playbackContainer {
  /* hidden by default via initial screen visibility */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.playback-image {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  object-fit: cover;
}

/* Stack video & preview */
.camera-wrapper {
  position: relative;
}

.camera-video,
.snapshot-preview {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

/* Ensure the snapshot sits exactly over the video */
.snapshot-preview {
  position: absolute;
  top: 0;
  left: 0;
}

/* Buttons in the camera scene */
.camera-button {
  margin-top: 1rem;
}

.snapshot-container {
  display: none;          /* hidden by default */
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.snapshot-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}
