
/* ==========================================================================
   FRAME - INTERFACE DE AGENDAMENTO GOOGLE MEET (DESIGN SYSTEM FRAME)
   ========================================================================== */

.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.cal-modal-open,
body.cal-modal-open {
  overflow: hidden !important;
}

.cal-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cal-modal-card {
  width: 100%;
  max-width: 820px;
  background: #070e19;
  border: 1px solid rgba(120, 183, 255, 0.22);
  border-radius: 15px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 99, 225, 0.15) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #ffffff;
}

.cal-modal-card,
.cal-modal-card * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.cal-modal-card button,
.cal-modal-card input,
.cal-modal-card select,
.cal-modal-card textarea {
  font: inherit !important;
}

.cal-modal-overlay.active .cal-modal-card {
  transform: scale(1) translateY(0);
}

/* Header */
.cal-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 22, 38, 0.8);
}

.cal-modal-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cal-modal-avatar.google-meet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cal-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.cal-modal-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8da1bc;
  margin-top: 4px;
  flex-wrap: wrap;
}

.cal-badge-pill {
  color: #cbd5e1;
}

.cal-meet-badge {
  display: inline-flex;
  align-items: center;
  color: #4ade80;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.cal-modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cal-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Body / Step 1 */
.cal-modal-body {
  display: flex;
  min-height: 380px;
}

.cal-calendar-pane {
  flex: 1.2;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-month-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.cal-nav-buttons {
  display: flex;
  gap: 6px;
}

.cal-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cal-nav-btn:hover {
  background: rgba(0, 99, 225, 0.25);
  border-color: rgba(120, 183, 255, 0.4);
  color: #ffffff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: #475569;
  cursor: default;
  transition: all 0.2s ease;
}

.cal-day.available {
  color: #f1f5f9;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cal-day.available:hover {
  background: rgba(0, 99, 225, 0.2);
  border-color: rgba(120, 183, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.cal-day.selected {
  background: #0063e1 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-color: #70b0ff !important;
  box-shadow: 0 4px 12px rgba(0, 99, 225, 0.4) !important;
}

/* Slots Pane */
.cal-slots-pane {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.cal-slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#cal-slots-date-label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.cal-slots-status {
  font-size: 11px;
  color: #34d399;
  font-weight: 500;
}

.cal-slots-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 290px;
  padding-right: 4px;
}

.cal-slots-placeholder {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  padding: 40px 10px;
  line-height: 1.5;
}

.cal-slot-row {
  display: flex;
  gap: 8px;
}

.cal-slot-btn {
  flex: 1;
  height: 42px;
  background: rgba(14, 28, 48, 0.7);
  border: 1px solid rgba(120, 183, 255, 0.22);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-slot-btn:hover {
  background: rgba(18, 38, 66, 0.9);
  border-color: rgba(120, 183, 255, 0.45);
}

.cal-slot-confirm-btn {
  display: none;
  width: 100px;
  height: 42px;
  background: #0063e1;
  border: 1px solid #60a5fa;
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  animation: slideFadeIn 0.2s ease forwards;
}

.cal-slot-row.is-active .cal-slot-btn {
  background: rgba(0, 99, 225, 0.2);
  border-color: #0063e1;
  color: #78b7ff;
}

.cal-slot-row.is-active .cal-slot-confirm-btn {
  display: block;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Step 2: Form Pane */
.cal-form-pane {
  padding: 28px 32px;
  flex-direction: column;
}

.cal-selected-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 99, 225, 0.12);
  border: 1px solid rgba(120, 183, 255, 0.28);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  color: #93c5fd;
  margin-bottom: 20px;
}

.cal-booking-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cal-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: -0.1px;
}

.cal-input-group input,
.cal-input-group select {
  height: 44px;
  background: #040912;
  border: 1px solid rgba(120, 183, 255, 0.2);
  border-radius: 12px;
  padding: 0 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cal-input-group input:focus,
.cal-input-group select:focus {
  border-color: #0063e1;
  box-shadow: 0 0 0 2px rgba(0, 99, 225, 0.25);
  outline: none;
}

.cal-input-group input::placeholder {
  color: #475569;
}

.cal-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.cal-back-btn {
  height: 46px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cal-submit-btn {
  flex: 1;
  height: 46px;
  background: #0063e1;
  border: 1px solid rgba(120, 183, 255, 0.4);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cal-submit-btn:hover {
  background: #0052bd;
  transform: translateY(-1px);
}

/* Step 3: Success Pane */
.cal-success-pane {
  padding: 40px 32px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cal-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.cal-success-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.4px;
  margin: 0 0 10px 0;
}

.cal-success-desc {
  font-size: 14px;
  color: #94a3b8;
  max-width: 480px;
  line-height: 1.6;
  margin: 0 auto 24px auto;
}

.cal-success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.cal-action-btn {
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.cal-action-btn:hover {
  transform: translateY(-2px);
}

.cal-gcal-btn {
  background: #0063e1;
  color: #ffffff;
  border: 1px solid rgba(120, 183, 255, 0.4);
}

.cal-wa-btn {
  background: #25D366;
  color: #0b1728;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cal-close-final-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 6px;
}

.cal-close-final-btn:hover {
  color: #94a3b8;
}

@media (max-width: 700px) {
  .cal-modal-body {
    flex-direction: column;
  }
  .cal-calendar-pane {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .cal-form-actions {
    flex-direction: column;
  }
  .cal-success-actions {
    flex-direction: column;
    width: 100%;
  }
  .cal-action-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   ALVOS TÁTEIS & ERGONOMIA MOBILE CAL SCHEDULER (48px - 56px)
   ========================================================================== */
@media (max-width: 700px) {
  .cal-modal-card {
    border-radius: 15px !important;
    max-height: 94vh !important;
    margin: 10px !important;
  }

  /* Botão fechar com alvo generoso de 44px */
  .cal-modal-close-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 18px !important;
    border-radius: 50% !important;
  }

  /* Setas de navegação de mês com 44px */
  .cal-nav-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 20px !important;
    border-radius: 12px !important;
  }

  /* Células de dias do calendário ergonômicas para o polegar */
  .cal-days-grid {
    gap: 4px !important;
  }

  .cal-day {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }

  /* Botões de horários com 48px de altura mínima e raio 15px */
  .cal-slot-btn {
    height: 48px !important;
    min-height: 48px !important;
    font-size: 15px !important;
    border-radius: 15px !important;
  }

  .cal-slot-confirm-btn {
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 15px !important;
  }

  /* Inputs de formulário com 48px e font-size 16px (evita auto-zoom do iOS) */
  .cal-input-group input,
  .cal-input-group select {
    height: 48px !important;
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 15px !important;
  }

  /* Botão de envio com 52px e raio 15px */
  .cal-submit-btn {
    height: 52px !important;
    min-height: 52px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 15px !important;
  }

  .cal-back-btn {
    height: 52px !important;
    min-height: 52px !important;
    font-size: 15px !important;
    border-radius: 15px !important;
  }

  .cal-action-btn {
    height: 50px !important;
    min-height: 50px !important;
    font-size: 14px !important;
    border-radius: 15px !important;
  }
}
