/*=============== POMODORO TIMER ===============*/
.pomodoro__container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/*=============== TIMER DISPLAY ===============*/
.pomodoro__timer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
}

.pomodoro__timer-circle {
  position: relative;
  width: 280px;
  height: 280px;
}

.pomodoro__progress-ring {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.pomodoro__progress-ring-circle-bg {
  stroke: var(--container-color);
  transition: stroke 0.4s;
}

.pomodoro__progress-ring-circle {
  stroke: var(--first-color);
  stroke-linecap: round;
  stroke-dasharray: 817;
  stroke-dashoffset: 817;
  transition: stroke-dashoffset 1s linear, stroke 0.4s;
}

.pomodoro__timer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
}

.pomodoro__timer-display {
  font-size: 3rem;
  font-family: var(--title-font);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 0.5rem;
  transition: color 0.4s;
}

.pomodoro__session-type {
  font-size: var(--h3-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  margin-bottom: 0.25rem;
  transition: color 0.4s;
}

.pomodoro__session-count {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  transition: color 0.4s;
}

/*=============== CONTROLS ===============*/
.pomodoro__controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.pomodoro__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px hsla(207, 24%, 35%, 0.1);
}

.pomodoro__btn i {
  font-size: 1.25rem;
}

.pomodoro__btn--start {
  background-color: var(--first-color);
  color: #fff;
}

.pomodoro__btn--start:hover {
  background-color: hsl(207, 65%, 55%);
  box-shadow: 0 6px 12px hsla(207, 24%, 35%, 0.15);
  transform: translateY(-2px);
}

.pomodoro__btn--pause {
  background-color: var(--first-color);
  color: #fff;
}

.pomodoro__btn--pause:hover {
  background-color: hsl(207, 65%, 55%);
  box-shadow: 0 6px 12px hsla(207, 24%, 35%, 0.15);
  transform: translateY(-2px);
}

.pomodoro__btn--reset {
  background-color: var(--container-color);
  color: var(--text-color);
  transition: all 0.3s;
}

.pomodoro__btn--reset:hover {
  background-color: hsl(207, 4%, 85%);
  box-shadow: 0 6px 12px hsla(207, 24%, 35%, 0.15);
  transform: translateY(-2px);
}

.pomodoro__btn--reset-active {
  color: var(--first-color);
}

.pomodoro__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/*=============== SETTINGS ===============*/
.pomodoro__settings {
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  transition: background-color 0.4s;
}

.pomodoro__settings-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.pomodoro__settings-title i {
  color: var(--first-color);
}

.pomodoro__settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.pomodoro__setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pomodoro__setting-group--full {
  grid-column: 1 / -1;
}

.pomodoro__label {
  font-size: var(--small-font-size);
  color: var(--text-color);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.pomodoro__label i {
  color: var(--first-color);
}

/*=============== INPUT WRAPPER ===============*/
.pomodoro__input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pomodoro__input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--body-color);
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
  background-color: var(--body-color);
  transition: all 0.3s;
  text-align: center;
  -moz-appearance: textfield; /* Firefox */
}

/* Custom number input spinner buttons */
.pomodoro__input::-webkit-outer-spin-button,
.pomodoro__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pomodoro__input:focus {
  outline: none;
  border-color: var(--first-color);
  box-shadow: 0 0 0 3px hsla(207, 65%, 65%, 0.1);
}

/*=============== CUSTOM INCREMENT BUTTONS ===============*/
.pomodoro__input-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--first-color);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.25rem;
}

.pomodoro__input-btn:hover {
  background-color: hsl(207, 65%, 55%);
  transform: scale(1.05);
}

.pomodoro__input-btn:active {
  transform: scale(0.95);
}

.pomodoro__input-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.pomodoro__input-btn i {
  pointer-events: none;
}

/*=============== PRESET BUTTONS ===============*/
.pomodoro__preset-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pomodoro__preset-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--body-color);
  border-radius: 0.5rem;
  background-color: var(--body-color);
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.3s;
  line-height: 1.4;
}

.pomodoro__preset-btn:hover {
  border-color: var(--first-color);
  background-color: hsla(207, 65%, 65%, 0.1);
}

.pomodoro__preset-btn--active {
  border-color: var(--first-color);
  background-color: var(--first-color);
  color: #fff;
}

.pomodoro__preset-btn--active:hover {
  background-color: hsl(207, 65%, 55%);
}

.pomodoro__preset-details {
  font-size: var(--smaller-font-size);
  opacity: 0.85;
  font-weight: var(--font-medium);
}

/*=============== SOUND SELECTOR ===============*/
.pomodoro__select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  border: 2px solid var(--body-color);
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
  background-color: var(--body-color);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.5rem) center;
  background-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  display: block;
}

.pomodoro__select:focus {
  outline: none;
}

#sound-selector-group {
  opacity: 1;
  transition: opacity 0.3s;
  position: relative;
}

#sound-selector-group.disabled {
  opacity: 0.5;
  pointer-events: none;
}

#ambient-selector-group,
#ambient-volume-group {
  opacity: 1;
  transition: opacity 0.3s;
}

#ambient-selector-group.disabled,
#ambient-volume-group.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/*=============== VOLUME SLIDER ===============*/
.pomodoro__volume-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  touch-action: none; /* Prevent page scroll when dragging */
}

.pomodoro__volume-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--body-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: none; /* Prevent page scroll when dragging slider */
}

.pomodoro__volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--first-color);
  cursor: pointer;
  transition: all 0.3s;
}

.pomodoro__volume-slider::-webkit-slider-thumb:hover {
  background: hsl(207, 65%, 55%);
  transform: scale(1.1);
}

.pomodoro__volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--first-color);
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.pomodoro__volume-slider::-moz-range-thumb:hover {
  background: hsl(207, 65%, 55%);
  transform: scale(1.1);
}

.pomodoro__volume-display {
  min-width: 45px;
  font-size: var(--small-font-size);
  color: var(--text-color);
  font-weight: var(--font-medium);
  text-align: right;
  transition: color 0.4s;
}

/*=============== CHECKBOX ===============*/
.pomodoro__checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.pomodoro__checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.pomodoro__checkbox-text {
  font-size: var(--normal-font-size);
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
  position: relative;
  padding-left: 28px;
}

.pomodoro__checkbox-text i {
  color: var(--first-color);
}

/* Custom checkbox box */
.pomodoro__checkbox-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-color-light);
  border-radius: 0.25rem;
  background-color: transparent;
  transition: all 0.3s;
}

/* Checkbox checked state - box */
.pomodoro__checkbox:checked ~ .pomodoro__checkbox-text::before {
  border-color: var(--first-color);
  background-color: var(--first-color);
}

/* Checkmark - Option 1: Small tick (current) */
.pomodoro__checkbox:checked ~ .pomodoro__checkbox-text::after {
  content: '';
  position: absolute;
  left: 8.5px;
  top: 4.5px;
  width: 3.5px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Option 2: Simple centered dot - uncomment to use
.pomodoro__checkbox:checked ~ .pomodoro__checkbox-text::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 50%;
}
*/

/* Option 3: Minimalist dash - uncomment to use
.pomodoro__checkbox:checked ~ .pomodoro__checkbox-text::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 2px;
  background-color: #fff;
  border-radius: 1px;
}
*/

/* Hover effect */
.pomodoro__checkbox-label:hover .pomodoro__checkbox-text::before {
  border-color: var(--first-color);
}

/*=============== INSTRUCTIONS ===============*/
.pomodoro__instructions {
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1rem;
  transition: background-color 0.4s;
}

.pomodoro__instructions-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.pomodoro__instructions-title i {
  color: var(--first-color);
}

.pomodoro__instructions-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.pomodoro__instructions-list li {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  line-height: 1.6;
  transition: color 0.4s;
}

.pomodoro__tip {
  padding: 1rem;
  background-color: var(--body-color);
  border-left: 4px solid var(--first-color);
  border-radius: 0.5rem;
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.4s, color 0.4s;
}

.pomodoro__tip i {
  color: var(--first-color);
  margin-right: 0.5rem;
}

/*=============== BREAKPOINT ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .pomodoro__container {
    padding: 1.5rem 0.75rem;
  }

  .pomodoro__timer-circle {
    width: 240px;
    height: 240px;
  }

  .pomodoro__timer-display {
    font-size: 2.5rem;
  }

  .pomodoro__btn {
    padding: 0.75rem 1.25rem;
    font-size: var(--small-font-size);
  }

  .pomodoro__settings,
  .pomodoro__instructions {
    padding: 1.5rem;
  }

  .pomodoro__preset-btn {
    min-width: 100%;
  }

  .pomodoro__settings-grid {
    grid-template-columns: 1fr;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .pomodoro__timer-circle {
    width: 320px;
    height: 320px;
  }

  .pomodoro__progress-ring {
    width: 320px;
    height: 320px;
  }

  .pomodoro__progress-ring-circle,
  .pomodoro__progress-ring-circle-bg {
    r: 150;
    cx: 160;
    cy: 160;
  }

  .pomodoro__progress-ring-circle {
    stroke-dasharray: 942;
    stroke-dashoffset: 942;
  }

  .pomodoro__timer-display {
    font-size: 3.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
  .pomodoro__container {
    padding: 3rem 2rem;
  }

  .pomodoro__settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pomodoro__controls {
    gap: 1.5rem;
  }

  .pomodoro__btn {
    padding: 1rem 2rem;
  }
}

/*=============== DARK THEME ===============*/
body.dark-theme .pomodoro__progress-ring-circle-bg {
  stroke: hsl(207, 4%, 15%);
}

body.dark-theme .pomodoro__btn--reset {
  background-color: hsl(207, 4%, 15%);
  color: var(--text-color);
}

body.dark-theme .pomodoro__btn--reset:hover {
  background-color: hsl(207, 4%, 20%);
}

body.dark-theme .pomodoro__input {
  border-color: hsl(207, 4%, 15%);
  background-color: hsl(207, 4%, 10%);
}

body.dark-theme .pomodoro__preset-btn {
  border-color: hsl(207, 4%, 15%);
  background-color: hsl(207, 4%, 10%);
}

body.dark-theme .pomodoro__preset-btn:hover {
  border-color: var(--first-color);
  background-color: hsla(207, 65%, 65%, 0.1);
}

body.dark-theme .pomodoro__tip {
  background-color: hsl(207, 4%, 10%);
}

body.dark-theme .pomodoro__select {
  border-color: hsl(207, 4%, 15%);
  background-color: hsl(207, 4%, 10%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-position: calc(100% - 0.5rem) center;
}

body.dark-theme .pomodoro__btn--reset-active {
  color: var(--first-color);
}

body.dark-theme .pomodoro__volume-slider {
  background: hsl(207, 4%, 15%);
}
