.global-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 10px;
  color: #ffffff;
}

.global-timer__host {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  line-height: 1;
  position: relative;
  top: 0;
}

#account .global-timer,
#account .global-timer__host {
  display: inline-flex !important;
  vertical-align: middle;
}

#top-menu #account {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

#top-menu #account > ul {
  margin: 0;
}

#top-menu #loggedas {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

#top-menu #loggedas a {
  line-height: 1;
}

#top-menu #loggedas::after {
  content: " ";
}

#top-menu #loggedas {
  gap: 4px;
}

#top-menu #loggedas {
  float: right;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  height: 24px;
  line-height: 24px;
  transform: translateY(1px);
}

#account > ul {
  display: flex;
  align-items: center;
}

#account > ul > li {
  display: flex;
  align-items: center;
}

#account .global-timer {
  margin-top: 0;
}

.global-timer.is-pending {
  visibility: hidden;
}

.global-timer__inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.global-timer__issue {
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.global-timer__issue:hover {
  text-decoration: underline;
}

.global-timer__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #c8f2dd;
}

.global-timer__action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.global-timer__action[data-action="pause"] {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff;
  font-weight: 900;
}

.global-timer__action--stop {
  background: rgba(255, 120, 120, 0.35);
  border-color: rgba(255, 180, 180, 0.9);
  color: #ffe3e3;
}

.global-timer__hint {
  color: #e6f1ff;
  font-size: 10px;
}

.global-timer__action[data-action="start"]::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(200, 242, 221, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  animation: globalTimerPulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes globalTimerPulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.2);
  }
  60% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8);
  }
}

.global-timer__toast {
  position: fixed;
  top: 12px;
  right: 16px;
  background: #2b2018;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 3000;
}

.global-timer__toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.global-timer-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
}

.global-timer-modal.is-open {
  display: block;
}

.global-timer-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.global-timer-modal__dialog {
  position: absolute;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  max-width: 92vw;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.global-timer-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f6efe6;
  border-bottom: 1px solid #e1d4c5;
}

.global-timer-modal__title {
  font-weight: 700;
  color: #2b2018;
}

.global-timer-modal__close {
  appearance: none;
  border: 1px solid #d6c4b1;
  background: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  color: #5b4636;
  font-weight: 700;
}

.global-timer-modal__body {
  flex: 1;
  background: #ffffff;
  padding: 12px 14px 14px;
  overflow: auto;
}

.global-timer-modal__issue {
  margin-bottom: 10px;
  font-weight: 700;
}

.global-timer-modal__issue a {
  color: #2b2018;
  text-decoration: none;
}

.global-timer-form__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.global-timer-form__row label {
  font-size: 12px;
  font-weight: 700;
  color: #5b4636;
}

.global-timer-form__row input,
.global-timer-form__row select,
.global-timer-form__row textarea {
  border: 1px solid #d6c4b1;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
}

.global-timer-form__actions {
  margin-top: 8px;
}

.global-timer-form__actions button {
  background: #dff4e7;
  border: 1px solid #7bbf95;
  color: #1b6b46;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.global-timer-modal-errors {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e1a1a1;
  background: #ffe6e6;
  color: #7c2c2c;
  font-size: 12px;
}

.global-timer-modal-errors:empty {
  display: none;
}
