/* Progress bar background */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh; /* Fallback */
  height: 100dvh; /* Dynamic viewport height */
  z-index: -1;
  background: #f8f9fa;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg,
    rgba(74, 222, 128, 0.15) 0%,
    rgba(34, 197, 94, 0.25) 50%,
    rgba(22, 163, 74, 0.35) 100%);
  transition: width 1s linear, background 0.5s ease;
}

.progress-bar-fill.warning {
  background: linear-gradient(135deg,
    rgba(251, 191, 36, 0.15) 0%,
    rgba(245, 158, 11, 0.25) 50%,
    rgba(217, 119, 6, 0.35) 100%);
}

.progress-bar-fill.danger {
  background: linear-gradient(135deg,
    rgba(248, 113, 113, 0.15) 0%,
    rgba(239, 68, 68, 0.25) 50%,
    rgba(220, 38, 38, 0.35) 100%);
}

/* Sticky settings gear */
.settings-gear {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  font-size: 1.5rem;
  color: #6c757d;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.settings-gear:hover {
  opacity: 1;
  transform: rotate(90deg);
  color: #495057;
}

/* Toggleable break/activity text */
.toggleable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.toggleable:hover {
  color: #007bff;
}

/* Timer Layout using CSS Grid and viewport units */
.timer-container {
  position: relative;
  height: 100vh; /* Fallback */
  height: 100dvh; /* Dynamic viewport height */
  display: grid;
  grid-template-rows: minmax(auto, 120px) 1fr;
  padding: 1.5rem;
  box-sizing: border-box;
  max-width: 1400px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
  z-index: 1;
}

.timer-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  align-items: center;
}

.timer-info-label {
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: #6c757d;
}

.timer-info-value {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
}

.timer-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 0; /* Important for Firefox */
  padding: 1rem 0;
}

.timer-label {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: clamp(0.5rem, 2vh, 2rem);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  color: #6c757d;
}

#timer {
  font-family: 'JetBrains Mono', monospace;
  /* More aggressive scaling to use available space */
  font-size: clamp(4rem, 25vw, 18rem);
  line-height: 1;
  font-weight: 700;
}

/* Ensure timer fits on smaller screens */
@media (max-width: 768px) {
  .timer-container {
    padding: 1rem;
    grid-template-rows: auto 1fr;
  }

  .settings-gear {
    bottom: 1rem;
    right: 1rem;
    font-size: 1.25rem;
  }

  .timer-info {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .timer-info > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }

  .timer-info-label {
    text-align: left;
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .timer-info-value {
    text-align: right;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  #timer {
    font-size: clamp(4rem, 22vw, 12rem);
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 700px) {
  .timer-container {
    grid-template-rows: auto 1fr;
    padding: 1rem;
  }

  .timer-info {
    margin-bottom: 0.5rem;
  }

  .timer-label {
    margin-bottom: 0.5rem;
  }

  #timer {
    font-size: clamp(3rem, 18vh, 10rem);
  }
}

/* Very large screens */
@media (min-width: 1400px) {
  #timer {
    font-size: clamp(8rem, 20vw, 22rem);
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
