/*
 * Traccar custom UI overrides.
 * Stable traccar-* classes are added in React source components.
 */

/*
 * Dynamic Street View / Aerial View panel.
 * The API key is read in JavaScript from server.attributes.street_view_api_key.
 * This section carries over the complete visual wrapper used by the old panel,
 * but scopes Google Maps overrides to this component only.
 */

.traccar-street-view {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 300px;
  overflow: hidden;
  box-sizing: border-box;
  color: #fff;
  background: #293b45;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Zwijana wyszukiwarka urządzeń */
.traccar-toolbar {
  gap: 0 !important;
}

.traccar-toolbar-search-toggle {
  flex: 0 0 auto;
}

.traccar-toolbar-search-toggle .ic02 {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.traccar-toolbar-search-control {
  display: flex;
  min-width: 0;
  align-items: center;
  flex: 0 0 auto;
}

.traccar-toolbar-search-control.open {
  flex: 1 1 auto;
}

.traccar-toolbar-add-device {
  margin-left: auto !important;
  flex: 0 0 auto;
}

.traccar-toolbar-search-shell {
  min-width: 0;
  margin-left: 8px;
  flex: 1 1 auto;
  transform-origin: left center;
  animation: traccar-search-slide 160ms ease-out;
}

.traccar-toolbar-search-shell .traccar-toolbar-search {
  width: 100%;
}

@keyframes traccar-search-slide {
  from {
    opacity: 0;
    transform: scaleX(0.72);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Przycisk lekkiej mini-mapy na belce urządzenia. */
.traccar-device-minimap-button {
  flex: 0 0 auto;
  margin-left: 2px !important;
  color: inherit;
}

.traccar-device-minimap-button .traccar-device-minimap-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.traccar-device-list-item-text {
  min-width: 0;
}

/* Natywne okna mini-map nad mapą główną. */
.traccar-device-minimap-canvas {
  position: fixed;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

.traccar-device-minimap-window {
  overflow: visible;
  box-sizing: border-box;
  pointer-events: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.traccar-device-minimap-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  color: #fbfbfb;
  background: rgba(11, 36, 55, 0.36);
  border: 1px solid rgba(242, 236, 236, 0.32);
  border-radius: 2px;
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.28);
}

.traccar-device-minimap-header {
  display: flex;
  width: 100%;
  height: 30px;
  padding: 0 2px 0 9px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  color: #fbfbfb;
  background: rgba(11, 36, 55, 0.72);
  border-bottom: 1px solid rgba(242, 236, 236, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 1px 1px 1px rgba(6, 6, 6, 0.47);
}

.traccar-device-minimap-title {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traccar-device-minimap-content {
  width: 100%;
  height: calc(100% - 30px);
  overflow: hidden;
  background: #0b2437;
}

.traccar-device-minimap-map {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-repeat: no-repeat;
}

.traccar-device-minimap-map .maplibregl-ctrl-top-right {
  top: 4px;
  right: 4px;
}

.traccar-device-minimap-map .maplibregl-ctrl-group {
  margin: 0;
}

/* Centrum szybkiego wyboru mapy */
#command-center-group {
  display: flex !important;
  width: 48px !important;
  flex-direction: column !important;
  gap: 0;
  background: transparent !important;
  box-shadow: none !important;
}

#command-center-group button {
  width: 29px !important;
  height: 29px !important;
  margin: 8px !important;
  padding: 5px !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
}

#command-center-group button + button {
  border-top: 0 !important;
}

#command-center-group button svg {
  display: block;
  width: 100%;
  height: 100%;
}

#command-center-group button.active {
  color: #4a9eff !important;
  background: transparent !important;
}

/* Natywna kontrolka nachylenia MapLibre */
.maplibre-pitch-panel {
  position: absolute;
  top: 100px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.maplibre-pitch-btn {
  padding: 5px 7px;
  color: #fff;
  background: #4285f4;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s;
}

.maplibre-pitch-btn:hover {
  background: #1f6fe7;
}

.maplibre-pitch-btn.active {
  background: #34a853;
}

.maplibre-pitch-btn.active:hover {
  background: #2d8e47;
}

.maplibre-pitch-shadow {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 80px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@media (max-width: 1199.98px) and (min-width: 768px) {
  .maplibre-pitch-shadow {
    height: 60px;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0) 100%
    );
  }
}

@media (max-width: 899.98px) {
  .traccar-main-header {
    position: relative !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  .traccar-toolbar-search-control {
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    z-index: 2;
    min-height: 48px;
    color: #f3f3f3;
    background: #0b2437;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .traccar-toolbar-search-control.open {
    width: min(360px, calc(100vw - 16px));
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .traccar-toolbar-search-control:not(.open) {
    width: 48px;
  }

  .traccar-toolbar-search-shell {
    margin-left: 0;
    margin-right: 8px;
  }

  .maplibre-pitch-panel {
    right: 7px;
  }

  .maplibre-pitch-shadow {
    height: 30px;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.2) 0%,
      rgba(0, 0, 0, 0) 50%,
      rgba(0, 0, 0, 0) 100%
    );
  }
}

.traccar-street-view:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #293b45;
}

.traccar-street-view-panorama,
.traccar-street-view-aerial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #4d5f4d;
  transition: opacity 120ms ease-out;
}

.traccar-street-view-panorama {
  z-index: 2;
}

.traccar-street-view-aerial {
  z-index: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.traccar-street-view-message {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  color: #fff;
  background: rgba(11, 36, 55, 0.76);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.traccar-street-view-action-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Bottom information bar */

.traccar-street-view .sv-bottom-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px 48px 10px 10px;
  box-sizing: border-box;
  border-radius: 4px 4px 0 0;
  background: rgba(55, 57, 59, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
}

.traccar-street-view .sv-address-container {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
}

.traccar-street-view .sv-address {
  display: -webkit-box;
  flex: 1 1 auto;
  max-width: 25ch;
  max-height: 3em;
  overflow: hidden;
  color: #fff;
  font-size: 0.74rem;
  line-height: 1.4;
  letter-spacing: 0.02071em;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.traccar-street-view .sv-thumb {
  flex: 0 0 auto;
  width: 70px;
  height: 45px;
  border: 1px solid rgba(207, 203, 203, 0.67);
  border-radius: 2px;
  object-fit: cover;
  background: #0c1a24;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.28);
}

.traccar-street-view .sv-vehicle-name {
  display: none;
  flex: 0 0 auto;
  max-width: 30ch;
  padding: 0 6px;
  overflow: hidden;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* View mode switch and information */

.traccar-street-view .sv-view-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.traccar-street-view .sv-view-toggle-btn {
  display: flex;
  width: 40px;
  height: 40px;
  padding: 10px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(18, 42, 56, 0);
  border: 1px solid #ebf0f3;
  border-radius: 80px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.21);
  cursor: pointer;
}

.traccar-street-view .sv-view-toggle-btn svg {
  width: 22px;
  height: 22px;
  padding: 3px;
  box-sizing: content-box;
  color: #fff;
  fill: currentColor;
  background: #2196f3;
  border-radius: 50px;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.traccar-street-view .sv-info-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.traccar-street-view .sv-view-mode-text,
.traccar-street-view .sv-zoom-text {
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.traccar-street-view .sv-view-mode-text {
  position: relative;
  top: 1px;
}

.traccar-street-view .sv-separator-line {
  position: relative;
  right: 4px;
  width: 120%;
  height: 1px;
  background: rgb(173, 179, 183);
}

/* Map source and fullscreen controls */

.traccar-street-view .sv-map-type-btn,
.traccar-street-view .sv-fullscreen-btn {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.traccar-street-view .sv-map-type-btn {
  top: 84px;
  right: 32px;
  width: 30px;
  height: 30px;
  opacity: 0.8;
}

.traccar-street-view .sv-map-type-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.traccar-street-view .sv-fullscreen-btn {
  top: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 3px;
}

.traccar-street-view .sv-fullscreen-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Vertical zoom slider */

.traccar-street-view .sv-zoom-slider {
  position: absolute;
  top: 50px;
  right: 1px;
  bottom: 80px;
  z-index: 9;
  width: 40px;
  touch-action: none;
  cursor: pointer;
}

.traccar-street-view .sv-zoom-track-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.traccar-street-view .sv-zoom-track {
  width: 3px;
  height: 80%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

.traccar-street-view .sv-zoom-thumb {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #1e88e5;
  border-radius: 50%;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 0 8px rgba(30, 136, 229, 0.08);
  transform: translate3d(-50%, -50%, 0);
  transition: top 120ms ease-out;
  pointer-events: none;
}

.traccar-street-view .sv-zoom-input {
  position: absolute;
  inset: 0 -4px;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

/* Google Maps controls from the original Street View wrapper, now scoped. */

.traccar-street-view .gm-style-cc,
.traccar-street-view .gmnoprint,
.traccar-street-view .gm-iv-address {
  display: none !important;
}

.traccar-street-view button.gm-control-active.gm-fullscreen-control {
  width: 35px !important;
  height: 35px !important;
  background: rgba(55, 53, 53, 0.62) !important;
}

.traccar-street-view .mapsConsumerUiSceneCoreScene__imageryRender {
  background-color: #292c2d !important;
}

@media (max-width: 600px) {
  .traccar-street-view {
    height: 280px;
  }

  .traccar-street-view .sv-bottom-bar {
    min-height: 62px;
    padding-left: 8px;
  }

  .traccar-street-view .sv-address-container {
    gap: 9px;
  }

  .traccar-street-view .sv-thumb {
    width: 62px;
    height: 42px;
  }
}

/*
 * Vehicle alarm / remote engine lock dialog.
 * All selectors are stable and intentionally independent from generated MUI
 * muiltr-* class names.
 */

.traccar-alarm-action-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

body.traccar-alarm-dialog-open {
  overflow: hidden;
}

.traccar-alarm-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: rgba(2, 12, 20, 0.38);
}

.traccar-alarm-dialog {
  position: relative;
  display: flex;
  width: min(380px, calc(100vw - 24px));
  max-height: min(660px, calc(100vh - 24px));
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(11, 36, 55, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow:
    0 11px 15px -7px rgba(0, 0, 0, 0.35),
    0 24px 38px 3px rgba(0, 0, 0, 0.22),
    0 9px 46px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.traccar-alarm-dialog button,
.traccar-alarm-dialog input {
  font: inherit;
}

.traccar-alarm-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.traccar-alarm-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.17rem;
  font-weight: 500;
  line-height: 1.25;
}

.traccar-alarm-device-name {
  max-width: 210px;
  margin-top: 5px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traccar-alarm-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.traccar-alarm-nav button {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.traccar-alarm-nav button:hover,
.traccar-alarm-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.traccar-alarm-page {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 16px 44px;
  overflow: auto;
  box-sizing: border-box;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.traccar-alarm-summary {
  display: grid;
  grid-template-columns: 1fr 124px;
  align-items: center;
  gap: 10px;
}

.traccar-alarm-statuses {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  font-size: 0.72rem;
}

.traccar-alarm-switch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.traccar-alarm-switch-row input {
  width: 31px;
  height: 17px;
  accent-color: #2196f3;
  cursor: pointer;
}

.traccar-alarm-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.traccar-alarm-state i {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.43);
  border-radius: 50%;
}

.traccar-alarm-state i::after {
  position: absolute;
  inset: 6px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  content: "";
}

.traccar-alarm-state i.alarm-on {
  border-color: rgba(255, 67, 67, 0.72);
}

.traccar-alarm-state i.alarm-on::after {
  background: #ff3b30;
  animation: traccar-alarm-blink 0.8s ease-in-out infinite;
}

.traccar-alarm-state i.engine-on {
  border-color: rgba(243, 155, 33, 0.72);
}

.traccar-alarm-state i.engine-on::after {
  background: #f39b21;
}

@keyframes traccar-alarm-blink {
  50% {
    opacity: 0.25;
  }
}

.traccar-alarm-vehicle {
  display: flex;
  width: 112px;
  height: 82px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.34);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 55px;
  font-size: 0.68rem;
}

.traccar-alarm-vehicle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.traccar-alarm-address {
  min-height: 52px;
  margin-top: 12px;
  padding: 7px 12px;
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(40, 67, 89, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: center;
}

.traccar-alarm-address small {
  display: block;
  margin-bottom: 4px;
  padding-bottom: 3px;
  color: rgba(255, 255, 255, 0.66);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
}

.traccar-alarm-address div {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.traccar-alarm-contact-toggle {
  display: grid;
  width: 100%;
  min-height: 51px;
  margin-top: 9px;
  padding: 5px 9px;
  grid-template-columns: 30px 1fr 20px;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(23, 47, 65, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.traccar-alarm-contact-toggle > span {
  display: flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  color: #54ba65;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.traccar-alarm-contact-toggle > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.traccar-alarm-contact-toggle small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traccar-alarm-contact-toggle strong {
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traccar-alarm-contact-toggle > b {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.traccar-alarm-contacts {
  margin-top: 6px;
  padding: 9px;
  background: rgba(8, 27, 41, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.traccar-alarm-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.traccar-alarm-contact-grid > div {
  display: flex;
  min-width: 0;
  min-height: 51px;
  padding: 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  cursor: pointer;
}

.traccar-alarm-contact-grid > div:hover,
.traccar-alarm-contact-grid > div.selected {
  background: #172f41;
  border-color: rgba(126, 200, 255, 0.42);
}

.traccar-alarm-contact-grid > div.editing {
  cursor: default;
}

.traccar-alarm-contact-grid strong,
.traccar-alarm-contact-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traccar-alarm-contact-grid strong {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
}

.traccar-alarm-contact-grid small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.67rem;
}

.traccar-alarm-contact-grid input {
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  box-sizing: border-box;
  color: #fff;
  background: rgba(23, 47, 65, 0.82);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  outline: 0;
  font-size: 0.68rem;
  text-align: center;
}

.traccar-alarm-secondary-button {
  display: block;
  margin: 10px auto 0;
  padding: 5px 20px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.7rem;
}

.traccar-alarm-secondary-button:hover {
  background: #172f41;
}

.traccar-alarm-time {
  width: fit-content;
  margin: 8px auto 0;
  padding: 4px 10px;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-size: 0.67rem;
}

.traccar-alarm-primary-button {
  width: 100%;
  min-height: 39px;
  margin-top: 9px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.traccar-alarm-primary-button:hover,
.traccar-alarm-primary-button.active {
  background: rgba(40, 67, 89, 0.86);
  border-color: rgba(126, 200, 255, 0.42);
}

.traccar-alarm-primary-button.active {
  animation: traccar-alarm-background 0.9s ease-in-out infinite;
}

.traccar-alarm-primary-button:disabled,
.traccar-alarm-dialog button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

@keyframes traccar-alarm-background {
  50% {
    background: rgba(61, 92, 116, 0.95);
  }
}

.traccar-alarm-settings h3,
.traccar-alarm-info h3 {
  margin: 4px 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.traccar-alarm-language-grid {
  display: grid;
  max-width: 290px;
  margin: 0 auto;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.traccar-alarm-language-grid button {
  display: flex;
  min-width: 0;
  padding: 4px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.61rem;
}

.traccar-alarm-language-grid button:hover,
.traccar-alarm-language-grid button.selected {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(126, 200, 255, 0.4);
}

.traccar-alarm-language-grid img {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.traccar-alarm-audio {
  display: grid;
  margin-top: 18px;
  padding: 12px;
  grid-template-columns: 29px 1fr 38px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.traccar-alarm-audio button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
}

.traccar-alarm-audio > div {
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.traccar-alarm-audio > div span {
  display: block;
  height: 100%;
  background: #2196f3;
}

.traccar-alarm-audio small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.68rem;
  text-align: right;
}

.traccar-alarm-settings p,
.traccar-alarm-info p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.55;
}

.traccar-alarm-info h3 {
  margin-top: 18px;
  text-align: left;
}

.traccar-alarm-info .traccar-alarm-warning {
  padding: 9px 11px;
  color: rgba(255, 220, 164, 0.85);
  background: rgba(243, 155, 33, 0.08);
  border: 1px solid rgba(243, 155, 33, 0.24);
  border-radius: 7px;
}

.traccar-alarm-message {
  flex: 0 0 auto;
  margin: 0 16px 35px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(24, 54, 75, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 0.69rem;
  text-align: center;
  cursor: pointer;
}

.traccar-alarm-dots {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.traccar-alarm-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: transparent;
  border: 1px solid #678399;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}

.traccar-alarm-dots button.active {
  background: #678399;
}

@media (max-width: 600px) {
  .traccar-alarm-modal-root {
    padding: 8px;
  }

  .traccar-alarm-dialog {
    width: min(380px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
  }

  .traccar-alarm-header {
    padding: 13px 12px 10px;
  }

  .traccar-alarm-header h2 {
    font-size: 1rem;
  }

  .traccar-alarm-page {
    padding: 12px 12px 42px;
  }

  .traccar-alarm-summary {
    grid-template-columns: 1fr 105px;
  }

  .traccar-alarm-vehicle {
    width: 98px;
    height: 72px;
  }
}
.traccar-replay-speed-slider {
  width: 90% !important;
}

.traccar-replay-speed-slider .MuiSlider-markLabel {
  font-size: 0.5625rem;
  margin-top: -15px;
}
