/* ============================================ */
/* agendar-atendimento.css                      */
/* Design: Calendar Scheduling Screen           */
/* ============================================ */

/* Wrapper geral da tela — estica para ocupar toda a largura da tela anulando o padding do pai */
.agendar-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #f5f5f7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  padding-bottom: 90px;
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
}

/* ============================================ */
/* HEADER INTERNO                               */
/* ============================================ */
.agendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  background: #f5f5f7;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Botão voltar */
.agendar-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1c1c1e;
  transition: background 0.15s ease;
}

.agendar-back-btn:active { background: rgba(0,0,0,0.12); }
.agendar-back-btn i { width: 18px; height: 18px; }

/* Seletor de mês */
.agendar-month-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.04);
  border: none;
  font-family: inherit;
}

.agendar-month-label {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
}

.agendar-month-selector i {
  width: 14px;
  height: 14px;
  color: #636366;
}

/* Área de ações no header (busca + avatar) */
.agendar-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agendar-search-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #636366;
}

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

.agendar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E4BFF 0%, #4F8AFF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
}

/* ============================================ */
/* CALENDÁRIO — GRADE SEMANAL                   */
/* ============================================ */
.agendar-calendar {
  background: #f5f5f7;
  padding: 0 16px 4px;
}

/* Cabeçalho dos dias da semana */
.agendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.agendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  padding: 4px 0;
}

/* Grade de dias */
.agendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
}

/* Célula de dia */
.agendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  cursor: pointer;
  position: relative;
}

.agendar-day-inner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #1c1c1e;
  transition: background 0.15s ease;
}

.agendar-day:active .agendar-day-inner {
  background: rgba(0,0,0,0.08);
}

/* Dia com evento (ponto azul abaixo) */
.agendar-day--has-event .agendar-day-inner::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary, #1E4BFF);
}

/* Dia selecionado */
.agendar-day--selected .agendar-day-inner {
  background: var(--primary, #1E4BFF) !important;
  color: #ffffff !important;
  font-weight: 700;
}

/* Dia de hoje (quando não selecionado) */
.agendar-day--today:not(.agendar-day--selected) .agendar-day-inner {
  border: 2px solid var(--primary, #1E4BFF);
  color: var(--primary, #1E4BFF);
  font-weight: 700;
}

/* Dia vazio (antes do dia 1) */
.agendar-day--empty {
  pointer-events: none;
}

.agendar-day--other-month .agendar-day-inner {
  color: #c7c7cc;
}

/* ============================================ */
/* DIA SELECIONADO — RESUMO                     */
/* ============================================ */
.agendar-selected-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.agendar-selected-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.agendar-day-number {
  font-size: 32px;
  font-weight: 800;
  color: #1c1c1e;
  line-height: 1;
}

.agendar-day-info {
  display: flex;
  flex-direction: column;
}

.agendar-day-name {
  font-size: 13px;
  font-weight: 600;
  color: #1c1c1e;
}

.agendar-day-summary {
  font-size: 11px;
  color: #8e8e93;
}

.agendar-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #1E4BFF);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ============================================ */
/* SEPARADOR                                    */
/* ============================================ */
.agendar-divider {
  height: 1px;
  background: #e5e5ea;
  margin: 0 20px 14px;
}

/* ============================================ */
/* LISTA DE EVENTOS / TAREFAS                   */
/* ============================================ */
.agendar-events-list {
  flex: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card de evento */
.agendar-event-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

/* Barra colorida lateral */
.agendar-event-bar {
  width: 4px;
  border-radius: 4px;
  align-self: stretch;
  min-height: 40px;
  flex-shrink: 0;
}

.agendar-event-bar--orange { background: var(--primary, #1E4BFF); }
.agendar-event-bar--blue   { background: var(--primary, #1E4BFF); }
.agendar-event-bar--purple { background: #7B3FC4; }
.agendar-event-bar--green  { background: #22C55E; }

/* Conteúdo do evento */
.agendar-event-content {
  flex: 1;
  min-width: 0;
}

.agendar-event-title {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agendar-event-time {
  font-size: 12px;
  color: #8e8e93;
}

/* Botão de ação do evento */
.agendar-event-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.agendar-event-action:active { opacity: 0.7; }

.agendar-event-action--orange {
  background: var(--primary, #1E4BFF);
  color: #ffffff;
}

.agendar-event-action--muted {
  background: #f0f0f5;
  color: #636366;
}

.agendar-event-action i { width: 16px; height: 16px; }

/* ============================================ */
/* SEÇÃO DE NOTAS / TAREFAS RÁPIDAS             */
/* ============================================ */
.agendar-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 20px 6px;
}

.agendar-task-placeholder {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 16px;
  font-size: 14px;
  color: #c7c7cc;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  cursor: pointer;
}

.agendar-task-item {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 6px 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.agendar-task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d1d1d6;
  flex-shrink: 0;
}

.agendar-task-text {
  font-size: 14px;
  color: #1c1c1e;
  flex: 1;
}

/* ============================================ */
/* FAB — Botão de Adicionar                     */
/* ============================================ */
.agendar-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary, #1E4BFF);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(30, 75, 255, 0.3);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: #ffffff;
}

.agendar-fab:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(30, 75, 255, 0.2);
}

.agendar-fab i { width: 22px; height: 22px; }

/* ============================================ */
/* APPLE-STYLE MONTH DROPDOWN POPUP             */
/* ============================================ */
.agendar-month-selector-wrapper {
  position: relative;
  display: inline-block;
}

.agendar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  min-width: 140px;
  padding: 5px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.15s;
  pointer-events: none;
}

.agendar-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.agendar-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1c1c1e;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.1s ease;
}

.agendar-dropdown-item:active {
  background: rgba(0, 0, 0, 0.05);
}

.agendar-dropdown-item.selected {
  color: var(--primary, #1E4BFF);
  font-weight: 700;
}

.agendar-dropdown-item i {
  width: 14px;
  height: 14px;
  color: var(--primary, #1E4BFF);
}
