/* ================================================= */
/* escala-vendedor.css — v2                          */
/* Módulo: Escala de Atendimento — Vendedor          */
/* Design: Social Profile Card                       */
/* ================================================= */

/* Container principal da lista */
.escala-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 16px 100px 16px;
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
}

/* =============================================== */
/* CARD                                            */
/* =============================================== */
.escala-card {
  background: #ffffff;
  border-radius: 20px;
  /* overflow: visible permite o avatar transbordar */
  overflow: visible;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
}

/* =============================================== */
/* GRADE DE FOTOS (topo)                           */
/* =============================================== */
.escala-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 130px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: #f0f0f5;
  gap: 2px;
}

/* Foto individual */
.escala-grid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder de foto (quando a imagem falhar) */
.escala-grid-cell {
  overflow: hidden;
  background: #e5e5ea;
  position: relative;
}

.escala-grid-cell--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f5 0%, #e0e0e8 100%);
  color: #c7c7cc;
}

.escala-grid-cell--empty i {
  width: 22px;
  height: 22px;
}

/* Quando há só 1 foto, ela ocupa tudo */
.escala-photo-grid--one .escala-grid-cell:first-child {
  grid-column: 1 / -1;
}

/* Quando há 2 fotos */
.escala-photo-grid--two .escala-grid-cell:last-child {
  grid-column: 2 / -1;
}

/* =============================================== */
/* AVATAR CIRCULAR (overlap)                       */
/* =============================================== */
.escala-avatar-row {
  display: flex;
  justify-content: center;
  margin-top: -38px; /* sobreposição no topo */
  position: relative;
  z-index: 10;
}

.escala-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #1E4BFF 0%, #4F8AFF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.escala-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================== */
/* CORPO DO CARD                                   */
/* =============================================== */
.escala-card-body {
  padding: 10px 16px 16px 16px;
  text-align: center;
}

/* Nome fantasia */
.escala-client-name {
  font-size: 19px;
  font-weight: 800;
  color: #1c1c1e;
  margin: 8px 0 5px;
  line-height: 1.2;
}

/* Local (bairro/cidade) */
.escala-client-location {
  font-size: 13px;
  color: #86868b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-bottom: 12px;
}

.escala-client-location i {
  width: 13px;
  height: 13px;
  color: #86868b;
  flex-shrink: 0;
}

/* =============================================== */
/* PILLS (padeiros que atendem)                    */
/* =============================================== */
.escala-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.escala-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.escala-pill--blue {
  color: #1E4BFF;
  border-color: #1E4BFF;
  background: rgba(30, 75, 255, 0.06);
}

.escala-pill--purple {
  color: #7B3FC4;
  border-color: #7B3FC4;
  background: rgba(123, 63, 196, 0.06);
}

.escala-pill--green {
  color: #22C55E;
  border-color: #22C55E;
  background: rgba(34, 197, 94, 0.06);
}

.escala-pill--orange {
  color: #F59E0B;
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.06);
}

/* Pill quando não há padeiro */
.escala-pill--muted {
  color: #8e8e93;
  border-color: #d1d1d6;
  background: transparent;
}

/* =============================================== */
/* LINHA DE STATS                                  */
/* =============================================== */
.escala-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1.5px solid #e5e5ea;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}

.escala-stat {
  padding: 11px 6px;
  text-align: center;
  border-right: 1px solid #e5e5ea;
}

.escala-stat:last-child {
  border-right: none;
}

.escala-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #1c1c1e;
  line-height: 1;
  display: block;
  margin-bottom: 3px;
}

.escala-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  line-height: 1.2;
}

/* =============================================== */
/* BOTÃO AGENDAR                                   */
/* =============================================== */
.escala-btn-agendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  background: #1E4BFF;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  letter-spacing: 0.1px;
}

.escala-btn-agendar:active {
  opacity: 0.82;
  transform: scale(0.97);
}

.escala-btn-agendar i {
  width: 18px;
  height: 18px;
}

/* =============================================== */
/* ESTADOS VAZIOS                                  */
/* =============================================== */
.escala-empty,
.agendar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 12px;
  min-height: 50vh;
}

.escala-empty i,
.agendar-empty i {
  width: 52px;
  height: 52px;
  color: #c7c7cc;
}

.escala-empty-title,
.agendar-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: #1c1c1e;
}

.escala-empty-sub,
.agendar-empty-sub {
  font-size: 14px;
  color: #8e8e93;
  max-width: 240px;
  line-height: 1.45;
}

.agendar-empty i {
  color: #1E4BFF;
  opacity: 0.25;
}

/* Botão Flutuante de Calendário */
.escala-floating-calendar {
  position: fixed;
  bottom: 100px; /* Acima da bottom-navbar */
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E4BFF 0%, #5E82FF 100%);
  border: none;
  box-shadow: 0 4px 16px rgba(30, 75, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #ffffff;
}

.escala-floating-calendar:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(30, 75, 255, 0.3);
}

.escala-floating-calendar i {
  width: 24px;
  height: 24px;
  color: #ffffff;
}
