/* Vehicle map popup — compact card, green accents */
#gps-device-parameters-view {
  width: 400px;
  max-width: 92vw;
}
#gps-device-parameters-view span[data-device="streetview"] {
  min-height: 90px;
}
.leaflet-popup-device .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}
.leaflet-popup-device .leaflet-popup-content {
  margin: 0;
  width: 400px !important;
  max-width: 92vw;
  background: #fff;
  box-shadow: none;
}
.leaflet-popup-device .leaflet-popup-tip {
  background: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.vehicle-popup-card {
  direction: inherit;
  text-align: start;
}
.vehicle-popup {
  background: #fff;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}
.vehicle-popup__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 9px;
  border-bottom: 1px solid #e8edf3;
}
.vehicle-popup__heading {
  flex: 1;
  min-width: 0;
}
.vehicle-popup__title-row {
  margin-bottom: 4px;
}
.vehicle-popup__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  word-break: break-word;
}
.vehicle-popup__plate {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.vehicle-popup__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.vehicle-popup__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.vehicle-popup__status.is-moving {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.vehicle-popup__status.is-stopped {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}
.vehicle-popup__status.is-offline {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
}
.vehicle-popup__speed {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}
.vehicle-popup__speed.is-moving {
  color: #16a34a;
}
.vehicle-popup__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.vehicle-popup__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.vehicle-popup__icon-btn:hover,
.vehicle-popup__icon-btn:focus {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  text-decoration: none;
}
.vehicle-popup__icon-btn .fa {
  font-size: 14px;
}
.vehicle-popup__body {
  padding: 10px 12px 11px;
}
.vehicle-popup__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.vehicle-popup__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.vehicle-popup__item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}
.vehicle-popup__item-icon .fa {
  font-size: 12px;
}
.vehicle-popup__item-icon .icon {
  color: #16a34a;
}
.vehicle-popup__item-label {
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.vehicle-popup__item-value {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
  line-height: 1.3;
}
.vehicle-popup__network {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vehicle-popup__gsm-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  color: #16a34a;
}
.vehicle-popup__network-text {
  line-height: 1.3;
}
.vehicle-popup__address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 9px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
}
.vehicle-popup__address-icon {
  color: #16a34a;
  margin-top: 1px;
  flex-shrink: 0;
  font-size: 12px;
}
.vehicle-popup__address-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.vehicle-popup__updated {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
}
.vehicle-popup__updated .fa {
  color: #16a34a;
  font-size: 11px;
}
.vehicle-popup__tabs-hidden {
  display: none;
}
.vehicle-popup__actions {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 6px 4px 8px;
  border-top: 1px solid #e8edf3;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.vehicle-popup__action {
  flex: 1 0 auto;
  min-width: 52px;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.vehicle-popup__action:hover,
.vehicle-popup__action:focus {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  text-decoration: none;
}
.vehicle-popup__action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}
.vehicle-popup__action-icon .fa {
  font-size: 14px;
}
.vehicle-popup__action-label {
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .leaflet-popup-device .leaflet-popup-content {
    width: 92vw !important;
    max-width: 92vw;
  }
  #gps-device-parameters-view {
    width: 92vw;
    max-width: 92vw;
  }
  .vehicle-popup__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .vehicle-popup__title {
    font-size: 14px;
  }
  .vehicle-popup__actions {
    justify-content: flex-start;
    padding-inline: 4px;
  }
  .vehicle-popup__action {
    min-width: 48px;
  }
}
[dir="rtl"] .vehicle-popup__header-actions {
  flex-direction: row-reverse;
}
[dir="rtl"] .vehicle-popup__item {
  flex-direction: row-reverse;
  text-align: right;
}
[dir="rtl"] .vehicle-popup__address {
  flex-direction: row-reverse;
  text-align: right;
}
[dir="rtl"] .vehicle-popup__updated {
  flex-direction: row-reverse;
}
[dir="rtl"] .vehicle-popup__network {
  flex-direction: row-reverse;
}

#widgets .widget-temp-humidity .table {
  width: 200px;
}
#widgets .widget-temp-humidity .table tr > td {
  width: 60%;
}
#widgets .widget-temp-humidity .table .icon {
  font-size: 1.8em;
  vertical-align: middle;
  color: #cccccc;
  margin-right: 5px;
}
[dir="rtl"] #widgets .widget-temp-humidity .table .icon {
  float: right;
  margin-right: 0;
  margin-left: 5px;
}
