/* Gimme Getter ver 1.3 optimized.css */
:root {
  --bg-dark-gray: #4a4a4a;
  --bg-mid-gray: #979797;
  --bg-light-gray: #e7e7e7;
  --bg-panel: #ffffff;
  --accent-orange: #f96807;
  --border-color: #000000;
  --font-main: 'Roboto', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-main);
  user-select: none;
  background-color: var(--bg-mid-gray);
}

#wrapper {
  padding: 0 20%;
  min-height: 100vh;
  box-sizing: border-box;
}

.sectionBorder {
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.sectionName {
  font-size: 14px;
  text-transform: uppercase;
}

.alignCenter {
  display: flex;
  align-items: center;
}

#app-header {
  padding: 0.5em 2%;
  background-color: var(--bg-dark-gray);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  position: relative;
}

.logo {
  max-width: 120px; /* Adjust this parameter to your desired layout size */
  height: auto;
  display: block;
}

#app-header-title {
  font-size: 1.7em;
  color: white;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none; /* Allows layout target clicks to pass straight through */
}

#app-header-menu {
  text-align: right;
}

.help-btn {
  color: #9c9c9c;
  text-decoration: none;
  font-size: 1.8rem;
  display: inline-block;
}

#infoBox {
  background-color: rgb(254, 255, 206);
  padding: 2em 3em;
}

a, a:hover { color: var(--accent-orange); }
p.links { margin: 0 0 .5em 0; }

.gimmeHeader {
  background-color: var(--bg-panel);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2.5em;
  padding: 0 1em;
  position: relative;
  z-index: 10;
}

.form {
  flex: 1;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.dropDownMenu {
  padding: 0;
  margin: 0;
  color: gray;
  font-size: 14px;
  text-transform: uppercase;
  height: 1.8em;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.gimmeCount {
  text-align: right;
  font-size: 14px;
  color: #555;
}

#pickRandomNum1, #pickRandomNum2 {
  display: none;
  text-align: center;
  background-color: var(--bg-panel);
}

.showGimmeDiv {
  display: flex;
  min-height: 20vh;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--bg-panel);
  border-top: none;
}

.gimmeText {
  width: 100%;
  text-align: center;
  padding: 0 .5em;
  font-size: 2em;
}

#stopwatches {
  background-color: var(--bg-light-gray);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
}

#lapDiv, #timerDiv {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

#upDownDiv {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  gap: .75em;
}

.buttonWide {
  width: 100%;
  padding: .7em 0;
  color: black;
  background-color: #efefef;
  border: 1px solid #c2c2c2;
  cursor: pointer;
  font-weight: bold;
}

.buttonWide:hover, .buttonWide:focus { background-color: #e5e5e5; }

.entryBox {
  width: 100%;
  font-size: large;
  text-align: center;
  padding: 4px;
  box-sizing: border-box;
}

#showTimerSec, #showTimerMin { width: 50%; }

.arrow {
  width: 35px;
  height: 30px;
  background-color: #7a7a7a;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  cursor: pointer;
}

.pointDown { transform: rotate(180deg); }

.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.35;
}

#counterDiv {
  min-height: 5vh;
  padding: 1rem 2rem;
  background-color: var(--bg-light-gray);
  cursor: pointer;
}

#showCounterNum {
  text-align: center;
  font-size: 3em;
  line-height: 1;
}

@media screen and (max-width: 768px) {
  #wrapper { padding: 0; }
}


@media screen and (max-width: 552px) {
  #wrapper {
    font-size: .85em;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Demands full browser viewport height */
    box-sizing: border-box;
  }

  #counterDiv {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: stretch;        
    margin-bottom: 0; 
    cursor: pointer; /* Confirms the entire box structure is a button */
  }

  #counterDiv .sectionName {
    position: static; /* Leaves the title in its perfect default alignment */
    margin-left: -12px; /* Adjust this number until it matches the Reps title perfectly */
  }

  #showCounterNum {
    flex: 1; /* Automatically forces the number's box to stretch to the bottom edge */
    display: flex;
    align-items: center;    /* Centering text vertically within the stretched area */
    justify-content: center; /* Centering text horizontally */
    font-size: 5em !important; 
    margin: 0;
    pointer-events: none; /* Passes taps through the text straight to the parent box container */
  }
  
  #app-header {
    grid-template-columns: auto 1fr auto; 
    gap: 0.25rem;
    justify-items: unset;
    padding: 0.6em 2%;
  }
  
  .logo {
    max-width: 100px;
    height: auto;
  }  

  #app-header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.44em;
    pointer-events: none;
  }

  #app-header-menu .help-btn svg {
    width: 34px !important;
    height: 34px !important;
  }

  .showGimmeDiv { min-height: 18vh; }
  .gimmeText { font-size: 1.6em; line-height: 1.3; }

  #upDownDiv {
    /* Restores vertical arrow layout sequence inside the middle column column */
    flex-direction: column; 
    padding: 0 0.5rem;
  }

  .pointDown {
    transform: rotate(180deg); 
  }

  .arrow:not(.pointDown) {
    transform: rotate(0deg); 
  }
}

/* Micro-animation: Flash Fade */
@keyframes flashFade {
  0% { opacity: 0.05; }   /* Drops opacity much lower to create a deeper flash */
  40% { opacity: 0.1; }    /* Holds the fade slightly longer */
  100% { opacity: 1; }     /* Smoothly fades back to fully visible */
}

.flash-active {
  animation: flashFade 0.25s cubic-bezier(0.25, 1, 0.5, 1); /* Extended duration with a smooth profile */
}