/* Barra inferior fixa e lista da frota PJ (PAG-22): desenho mobile-first a partir de 320 px. */

body:has(.vd-bar) {
  padding-bottom: 96px;
}

@media (min-width: 1024px) {
  body:has(.vd-bar) {
    padding-bottom: 84px;
  }
}

.vd-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #FFFFFF;
  border-top: 1px solid #E3E6F0;
  box-shadow: 0 -8px 24px rgba(0, 0, 63, 0.10);
}

.vd-bar-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 760px) {
  .vd-bar-name {
    display: none;
  }
}

/* Aviso curto de item retirado ou indisponível (6 s) com botão Desfazer */
.fl-notice {
  background: #00003F;
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.35;
}

.fl-notice__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4px 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 1024px) {
  .fl-notice__inner {
    padding: 4px 24px;
  }
}

.fl-undo-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}

.fl-undo-btn:hover,
.fl-undo-btn:focus-visible {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

/* Gaveta da barra aberta: cresce para cima (~60% da tela) com topo fixo e rolagem na lista */
.fl-drawer {
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-bottom: 1px solid #E3E6F0;
}

.fl-drawer__head-wrap {
  flex: none;
  background: #F8FAFE;
  border-bottom: 1px solid #EEF0F6;
}

.fl-drawer__head {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 12px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 1024px) {
  .fl-drawer__head {
    padding: 8px 24px;
  }
}

.fl-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(60vh - 58px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fl-drawer__body-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 12px;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .fl-drawer__body-inner {
    padding: 12px 24px;
  }
}

/* Linha fechada da barra inferior */
.fl-bar-row {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

@media (min-width: 1024px) {
  .fl-bar-row {
    padding: 12px 24px;
    gap: 16px;
  }
}

/* No celular, o texto "Sua frota · N planos" é o próprio botão "Ver frota" */
.fl-toggle-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid #00003F;
  background: #F3F7FC;
  color: #00003F;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  flex: 0 1 auto;
}

.fl-bar-summary-desktop {
  display: none;
}

.fl-toggle-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .fl-toggle-mobile {
    display: none;
  }

  .fl-bar-summary-desktop {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .fl-toggle-desktop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1.5px solid #00003F;
    background: #FFFFFF;
    color: #00003F;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }

  .fl-toggle-desktop:hover,
  .fl-toggle-desktop:focus-visible {
    border-color: #D60000;
    color: #D60000;
  }
}

.fl-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

@media (min-width: 1024px) {
  .fl-bar-actions {
    gap: 12px;
  }
}

.fl-bar-btn {
  min-height: 44px;
  height: 44px;
  font-size: 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.fl-bar-btn.btn .btn__face,
.fl-bar-btn.btn::after {
  padding: 0 10px;
}

@media (min-width: 1024px) {
  .fl-bar-btn {
    height: 40px;
    font-size: 13px;
  }

  .fl-bar-btn.btn .btn__face,
  .fl-bar-btn.btn::after {
    padding: 0 20px;
  }
}

/* Lista de itens da frota (templates/cotton/fleet/items.html): cabe em 320 px */
.fl-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: none;
}

.fl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #F3F7FC;
  border-radius: 12px;
  padding: 6px 8px 6px 10px;
  box-sizing: border-box;
  min-width: 0;
}

.fl-item__info {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fl-item__car {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #00003F;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.fl-item__car:hover,
.fl-item__car:focus-visible {
  text-decoration: underline;
}

.fl-item__meta {
  font-size: 12px;
  line-height: 1.3;
  color: #4A4A6A;
  overflow-wrap: anywhere;
}

.fl-item__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fl-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #C9CFE0;
  border-radius: 999px;
  background: #FFFFFF;
  overflow: hidden;
}

.fl-qty__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: #FFFFFF;
  color: #00003F;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.fl-qty__btn:disabled {
  color: #B0B5C9;
  background: #F5F6FA;
  cursor: not-allowed;
}

.fl-qty__val {
  min-width: 22px;
  padding: 0 2px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #00003F;
}

.fl-remove {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #C9CFE0;
  background: #FFFFFF;
  color: #00003F;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
}

.fl-remove:hover,
.fl-remove:focus-visible {
  border-color: #D60000;
  color: #D60000;
}

/* Esvaziar frota e confirmação inline ("Esvaziar a frota?" Sim / Não) */
.fl-clear-btn {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #D60000;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.fl-clear-btn:hover,
.fl-clear-btn:focus-visible {
  text-decoration: underline;
}

.fl-clear-confirm {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.fl-clear-yes {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: #D60000;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fl-clear-no {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #C9CFE0;
  background: #FFFFFF;
  color: #00003F;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Visibilidade dos elementos da frota (fleet.js: shownIf). */
.fl-hidden {
  display: none !important;
}
