.assignment-timer-badge {
  background: rgba(18, 47, 73, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  box-sizing: border-box;
  color: #fff;
  display: none;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  height: 30px;
  letter-spacing: 0.04em;
  line-height: 28px;
  min-width: 86px;
  padding: 0 10px;
  pointer-events: none;
  position: static;
  text-align: center;
  z-index: 105;
}

#toolbar #open-right.assignment-timer-enabled {
  overflow: visible;
}

#toolbar #open-right .assignment-timer-toolbar-group {
  align-items: center;
  display: flex;
  height: 44px;
  justify-content: flex-end;
  position: absolute;
  right: 44px;
  top: 0;
  width: calc(40vw - 40px);
}

#toolbar #open-right .assignment-timer-toolbar-group .assignment-timer-badge {
  margin-right: 8px;
}

#toolbar #open-right .assignment-timer-toolbar-group h1 {
  flex: 0 1 auto;
  left: auto;
  margin: 0;
  min-width: 0;
  position: static;
  right: auto;
  white-space: nowrap;
  width: auto;
  z-index: auto;
}

.assignment-timer-badge.is-warning {
  background: #a96900;
  border-color: #f8d583;
}

.assignment-timer-badge.is-urgent {
  animation: assignment-timer-pulse 1.4s ease-in-out infinite;
  background: #a93434;
  border-color: #ffc2c2;
}

.assignment-timer-badge.is-expired {
  animation: none;
  letter-spacing: 0;
  min-width: 96px;
  white-space: nowrap;
}

body.assignment-timer-expired-map #deck-view {
  cursor: not-allowed;
}

body.assignment-timer-expired-map #deck-view::after {
  background: rgba(20, 29, 38, 0.42);
  border-radius: inherit;
  bottom: 0;
  content: '';
  cursor: not-allowed;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 6;
}

body.assignment-timer-expired-map .assigned-decks,
body.assignment-timer-expired-map .btn-plugins,
body.assignment-timer-expired-map .plugins-area-wrapper {
  pointer-events: auto;
}

.assignment-timer-roster-row {
  position: relative !important;
}

.assignment-timer-roster-badge {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(9, 18, 28, 0.24);
  box-sizing: border-box;
  color: #fff;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  height: 18px;
  letter-spacing: 0.01em;
  line-height: 16px;
  max-width: 64px;
  overflow: hidden;
  padding: 0 6px;
  pointer-events: none;
  position: absolute;
  right: 38px;
  text-align: center;
  text-indent: 0;
  text-overflow: ellipsis;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 3;
}

.assignment-timer-roster-badge.is-active {
  background: #287694;
  min-width: 48px;
}

.assignment-timer-roster-badge.is-warning {
  background: #8c6200;
  border-color: rgba(255, 224, 148, 0.55);
}

.assignment-timer-roster-badge.is-urgent {
  background: #a13d3d;
  border-color: rgba(255, 203, 203, 0.55);
}

.assignment-timer-roster-badge.is-not-started {
  background: #5d6872;
}

.assignment-timer-roster-badge.is-expired {
  background: #873d43;
  border-color: rgba(255, 210, 210, 0.42);
}

.assignment-timer-roster-badge.is-unlimited {
  background: #455562;
  border-color: rgba(220, 235, 245, 0.28);
}

.assignment-timer-roster-badge.is-unavailable {
  background: #5f6870;
  color: #e3e8eb;
  min-width: 25px;
}

.assignment-timer-roster-name {
  display: inline-block;
  overflow: hidden;
  position: static;
  text-overflow: ellipsis;
  transform: none;
  vertical-align: top;
  white-space: nowrap;
}

#myModal .modal-title .assignment-timer-student-detail-action-group {
  align-items: center;
  display: flex;
  float: right;
  gap: 8px;
  margin-right: 22px;
  margin-top: -5px;
  max-width: calc(100% - 120px);
}

#myModal .modal-title .assignment-timer-student-detail-action-group .btn {
  float: none !important;
  flex: 0 0 auto;
  margin: 0 !important;
}

#myModal .modal-title .assignment-timer-student-detail-status {
  border-color: #9aabb7;
  border-radius: 15px;
  color: #3c5568;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 20px;
  min-width: 84px;
  padding: 5px 10px;
  text-align: center;
}

#myModal .modal-title .assignment-timer-student-detail-status.is-active {
  background: #e8f7fc;
  border-color: #75bdd5;
  color: #17627d;
}

#myModal .modal-title .assignment-timer-student-detail-status.is-warning {
  background: #fff7df;
  border-color: #d9b657;
  color: #755200;
}

#myModal .modal-title .assignment-timer-student-detail-status.is-urgent,
#myModal .modal-title .assignment-timer-student-detail-status.is-expired {
  background: #fff0f0;
  border-color: #d58d91;
  color: #8c3037;
}

#myModal .modal-title .assignment-timer-student-detail-status.is-not-started {
  background: #f2f4f6;
  border-color: #b8c1c8;
  color: #56626b;
}

.assignment-timer-student-control {
  margin: 8px auto;
  max-width: 340px;
  text-align: center;
}

.assignment-timer-student-control-status {
  align-items: center;
  background: #f2f4f6;
  border: 1px solid #ccd4da;
  border-radius: 8px;
  color: #46535d;
  display: flex;
  font-size: 18px;
  gap: 10px;
  justify-content: center;
  min-height: 62px;
  padding: 12px 16px;
}

.assignment-timer-student-control-status.is-active {
  background: #edf9fd;
  border-color: #8bc8dc;
  color: #17627d;
}

.assignment-timer-student-control-status.is-warning {
  background: #fff8e6;
  border-color: #e2c46e;
  color: #755200;
}

.assignment-timer-student-control-status.is-urgent,
.assignment-timer-student-control-status.is-expired {
  background: #fff1f1;
  border-color: #dda1a5;
  color: #8c3037;
}

.assignment-timer-student-control-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.assignment-timer-student-control-actions span {
  background: #4fb4dc;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  flex: 1 1 0;
  font-size: 14px;
  font-weight: 700;
  max-width: 150px;
  padding: 10px 12px;
}

.assignment-timer-student-control-actions .assignment-timer-detail-reset {
  background: #64727d;
}

.assignment-timer-dialog.is-busy .assignment-timer-student-control-actions {
  opacity: 0.55;
  pointer-events: none;
}

.assignment-timer-deadline-summary {
  color: rgba(255, 255, 255, 0.82);
  display: inline-block;
  flex: 0 1 auto;
  font-size: 10px;
  font-weight: 600;
  line-height: 22px;
  max-width: 250px;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
  position: static;
  text-overflow: ellipsis;
  transform: none;
  white-space: nowrap;
}

.assignment-timer-deadline-summary::before {
  content: "\f017";
  font-family: FontAwesome;
  font-size: 9px;
  margin-right: 4px;
}

.assignment-timer-deadline-summary.is-scheduled {
  color: #d5eef9;
}

.assignment-timer-deadline-summary.is-expired {
  color: #ffd0d0;
}

.assignment-timer-deadline-summary.is-none {
  color: rgba(255, 255, 255, 0.58);
}

.assignment-timer-blocker {
  align-items: center;
  background: rgba(20, 29, 38, 0.48);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 44px;
  z-index: 2147482999;
}

.assignment-timer-blocker-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.28);
  color: #283747;
  max-width: 430px;
  padding: 28px;
  text-align: center;
}

.assignment-timer-blocker-panel > .fa {
  color: #3676ae;
  font-size: 38px;
}

.assignment-timer-blocker-panel h2 {
  font-size: 25px;
  margin: 12px 0 7px;
}

.assignment-timer-blocker-panel p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.assignment-timer-retry,
.assignment-timer-student-actions span {
  color: #1769aa;
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
  margin: 14px 7px 0;
  text-decoration: underline;
}

.assignment-timer-editor {
  margin: 4px auto 0;
  max-width: 430px;
  text-align: left;
}

.assignment-timer-header-controls {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
  min-width: 0;
  white-space: nowrap;
}

.activity-header-wrapper .assignment-timer-header-controls .btn-activity {
  align-items: center;
  display: inline-flex !important;
  flex: 0 0 auto;
  gap: 4px;
  justify-content: center;
  margin: 0 !important;
}

.assignment-timer-choice {
  align-items: flex-start;
  border: 1px solid #dce4eb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  margin: 8px 0;
  padding: 11px 12px;
}

.assignment-timer-choice.is-selected {
  background: #f5fbff;
  border-color: #8bc8e8;
}

.sweet-alert .assignment-timer-choice input[type='checkbox'],
.assignment-timer-dialog .assignment-timer-choice input[type='checkbox'] {
  appearance: checkbox !important;
  -webkit-appearance: checkbox !important;
  display: inline-block !important;
  flex: 0 0 auto;
  height: auto !important;
  margin: 4px 10px 0 0;
  padding: 0 !important;
  width: auto !important;
}

.assignment-timer-choice span {
  flex: 1 1 auto;
}

.assignment-timer-choice strong,
.assignment-timer-choice small {
  display: block;
}

.assignment-timer-choice small {
  color: #5f6f7c;
  margin-top: 5px;
}

.assignment-timer-choice input:disabled {
  background: #f3f5f6 !important;
  color: #98a1a8 !important;
  cursor: not-allowed;
}

.assignment-timer-minutes,
.assignment-timer-seconds,
.assignment-timer-deadline {
  border: 1px solid #b8c5cf !important;
  border-radius: 4px !important;
  box-sizing: border-box;
  color: #263746 !important;
  display: inline-block !important;
  font-size: 14px !important;
  height: 32px !important;
  padding: 5px 7px !important;
}

.assignment-timer-minutes {
  width: 82px !important;
}

.assignment-timer-seconds {
  width: 74px !important;
}

.assignment-timer-test-seconds {
  color: #8a5b00 !important;
  font-size: 11px;
  margin-top: 8px !important;
}

.assignment-timer-local-time-note {
  color: #7b8790 !important;
  font-size: 11px;
  margin-top: 3px !important;
}

.assignment-timer-deadline {
  width: 100% !important;
}

.assignment-timer-students {
  border-top: 1px solid #e4e9ed;
  margin: 16px auto 0;
  max-width: 430px;
  padding-top: 12px;
  text-align: left;
}

.assignment-timer-students h4 {
  margin: 0 0 8px;
}

.assignment-timer-student-list {
  max-height: 210px;
  overflow: auto;
}

.assignment-timer-student-row {
  align-items: center;
  border-bottom: 1px solid #edf0f2;
  display: flex;
  min-height: 39px;
  padding: 5px 2px;
}

.assignment-timer-student-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-timer-student-row .label {
  flex: 0 0 auto;
  margin-left: 6px;
}

.assignment-timer-student-actions {
  flex: 0 0 auto;
}

.assignment-timer-student-actions span {
  font-size: 12px;
  margin: 0 0 0 9px;
}

body.assignment-timer-dialog-open {
  overflow: hidden !important;
}

.assignment-timer-dialog-overlay {
  align-items: flex-start;
  background: rgba(19, 28, 36, 0.58);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  overflow: hidden;
  padding: 14px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2147483000;
}

.assignment-timer-dialog {
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  color: #344450;
  display: flex;
  flex-direction: column;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  max-height: calc(100vh - 28px);
  max-width: 520px;
  outline: 0;
  overflow: hidden;
  width: 100%;
}

.assignment-timer-dialog-manager {
  max-width: 560px;
}

.assignment-timer-dialog-student {
  max-width: 440px;
}

.assignment-timer-dialog-time-up {
  margin-top: 18vh;
  max-width: 330px;
  position: relative;
  text-align: center;
}

.assignment-timer-dialog-time-up .assignment-timer-dialog-header {
  border-bottom: 0;
  min-height: 0;
  padding: 10px 52px 26px;
}

.assignment-timer-dialog-time-up .assignment-timer-dialog-header h2 {
  flex: 1 1 100%;
  text-align: center;
  width: 100%;
}

.assignment-timer-dialog-time-up .assignment-timer-dialog-close {
  margin: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
}

.assignment-timer-dialog-time-up .assignment-timer-dialog-body {
  order: -1;
  padding: 24px 52px 0;
}

.assignment-timer-time-up-icon {
  color: #3676ae;
  font-size: 40px;
  line-height: 1;
}

.assignment-timer-dialog-student-message {
  color: #50616d;
  font-size: 16px;
  line-height: 1.55;
}

.assignment-timer-dialog-student-message p {
  margin: 4px 0 14px;
}

.assignment-timer-dialog-student-message p:last-child {
  margin-bottom: 2px;
}

.assignment-timer-dialog-header {
  align-items: center;
  border-bottom: 1px solid #e4eaee;
  display: flex;
  flex: 0 0 auto;
  min-height: 60px;
  padding: 0 16px 0 20px;
}

.assignment-timer-dialog-header h2 {
  color: #344450;
  flex: 1 1 auto;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.assignment-timer-dialog-close {
  background: transparent;
  border: 0;
  color: #71808b;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 30px;
  line-height: 36px;
  margin-left: 12px;
  padding: 0;
  width: 36px;
}

.assignment-timer-dialog-close:hover,
.assignment-timer-dialog-close:focus {
  color: #344450;
  outline: 2px solid #8bc8e8;
  outline-offset: 1px;
}

.assignment-timer-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 20px 18px;
}

.assignment-timer-dialog-error {
  background: #fff0f0;
  border-bottom: 1px solid #edc4c4;
  color: #9d2f2f;
  display: none;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: 9px 20px;
}

.assignment-timer-dialog-footer {
  align-items: center;
  background: #f7f9fa;
  border-top: 1px solid #e4eaee;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 20px;
}

.assignment-timer-dialog-footer button {
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  min-width: 112px;
  padding: 10px 18px;
}

.assignment-timer-dialog-cancel {
  background: #d5dadd;
  color: #344450;
}

.assignment-timer-dialog-confirm {
  background: #55b8e5;
  color: #fff;
}

.assignment-timer-dialog-footer button:hover,
.assignment-timer-dialog-footer button:focus {
  filter: brightness(0.94);
  outline: 2px solid #377aa0;
  outline-offset: 1px;
}

.assignment-timer-dialog-footer button:disabled,
.assignment-timer-dialog-close:disabled {
  cursor: default;
  opacity: 0.6;
}

.assignment-timer-dialog.is-busy .assignment-timer-dialog-body {
  opacity: 0.72;
  pointer-events: none;
}

.assignment-timer-dialog-loading,
.assignment-timer-dialog-empty {
  color: #677783;
  font-size: 15px;
  padding: 30px 12px;
  text-align: center;
}

.assignment-timer-dialog-loading .fa,
.assignment-timer-dialog-empty .fa {
  color: #418ab0;
  font-size: 24px;
  margin-right: 7px;
}

.assignment-timer-dialog-empty p {
  margin: 10px 0 0;
}

@keyframes assignment-timer-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 180, 180, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 180, 180, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .assignment-timer-badge.is-urgent {
    animation: none;
  }
}

@media (max-width: 600px) {
  .assignment-timer-dialog-overlay {
    padding: 6px;
  }
  .assignment-timer-dialog {
    max-height: calc(100vh - 12px);
  }
  .assignment-timer-dialog-header {
    min-height: 52px;
    padding-left: 14px;
    padding-right: 8px;
  }
  .assignment-timer-dialog-header h2 {
    font-size: 20px;
  }
  .assignment-timer-dialog-body {
    padding: 10px 12px 14px;
  }
  .assignment-timer-dialog-error {
    padding-left: 12px;
    padding-right: 12px;
  }
  .assignment-timer-dialog-footer {
    padding: 10px 12px;
  }
  .assignment-timer-dialog-footer button {
    flex: 1 1 0;
    min-width: 0;
  }
  #toolbar #open-right .assignment-timer-toolbar-group {
    width: auto;
  }
  #toolbar #open-right.assignment-timer-counting .assignment-timer-toolbar-group h1 {
    display: none;
  }
  .assignment-timer-badge {
    font-size: 13px;
    min-width: 78px;
  }
  .assignment-timer-badge.is-expired {
    min-width: 84px;
  }
  .assignment-timer-dialog-time-up {
    margin-top: 12vh;
  }
  .assignment-timer-deadline-summary {
    max-width: calc(100vw - 175px);
  }
  #myModal .modal-title .assignment-timer-student-detail-status {
    font-size: 11px;
    line-height: 18px;
    min-width: 72px;
    padding: 4px 8px;
  }
  #myModal .modal-title .assignment-timer-student-detail-action-group {
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
    max-width: calc(100% - 80px);
  }
  .assignment-timer-student-control-actions {
    gap: 8px;
  }
  .assignment-timer-student-control-actions span {
    padding: 9px 8px;
  }
  .assignment-timer-blocker {
    padding: 12px;
  }
  .assignment-timer-blocker-panel {
    padding: 23px 18px;
  }
}
