/* App theme styles */
:root {
  --theme-primary: #1f5567;
  --theme-primary-dark: #3a90ad;
  --theme-secondary: #7fc8a9;
  --theme-surface: #f9fafb;
  --theme-text: #374151;
  --theme-text-muted: #6b7280;
  --theme-border: #e5e7eb;
  --theme-primary-rgb: 31, 85, 103;
  --theme-secondary-rgb: 127, 200, 169;
  --theme-mobile-bar-bg: #d7f3e7;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--theme-text);
  background-color: var(--theme-surface);
}

.theme-bg-gradient {
  background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
}

.theme-primary {
  color: var(--theme-primary) !important;
}

.theme-primary-dark {
  color: var(--theme-primary-dark) !important;
}

.text-theme-primary {
  color: var(--theme-primary) !important;
}

.theme-bg-primary {
  background-color: var(--theme-primary) !important;
}

.theme-bg-dark {
  background-color: var(--theme-dark) !important;
}

.theme-border-primary {
  border-color: var(--theme-primary) !important;
}

.theme-hover-primary:hover {
  background-color: var(--theme-primary) !important;
  color: white !important;
}

.step-fade-in {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-step {
  transition: all 0.3s ease;
  background-color: var(--theme-border);
  color: var(--theme-text);
}

.progress-step.active {
  background-color: var(--theme-primary) !important;
  color: white !important;
}

.progress-step.completed {
  background-color: var(--theme-secondary) !important;
  color: white !important;
}

.btn-theme-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: white;
  transition: all 0.3s ease;
}

.btn-theme-primary:hover,
.btn-theme-primary:active,
.btn-theme-primary.active,
.btn-theme-primary:focus {
  background-color: var(--theme-primary-dark) !important;
  border-color: var(--theme-primary-dark) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3) !important;
}

.btn-theme-outline {
  border: 2px solid var(--theme-primary);
  color: var(--theme-primary);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-theme-outline:hover {
  background-color: var(--theme-primary);
  color: white;
  transform: translateY(-2px);
}

.service-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.service-card.selected {
  border-color: var(--theme-primary) !important;
  background-color: rgba(var(--theme-primary-rgb), 0.05);
}

.professional-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.professional-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.professional-card.selected {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2);
}

.time-slot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.time-slot:hover:not(.disabled) {
  background-color: var(--theme-primary) !important;
  color: white !important;
  transform: scale(1.05);
}

.time-slot.selected {
  background-color: var(--theme-primary) !important;
  color: white !important;
}

.time-slot.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-day {
  transition: all 0.3s ease;
  cursor: pointer;
}

.calendar-day:hover:not(.disabled) {
  background-color: var(--theme-primary) !important;
  color: white !important;
  border-color: var(--theme-primary) !important;
}

.calendar-day.selected {
  background-color: var(--theme-primary) !important;
  color: white !important;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f9fafb" width="1200" height="600"/><g fill="%23e5e7eb"><circle cx="200" cy="100" r="50" opacity="0.1"/><circle cx="800" cy="200" r="80" opacity="0.1"/><circle cx="400" cy="400" r="60" opacity="0.1"/><circle cx="1000" cy="500" r="70" opacity="0.1"/></g></svg>') center/cover;
}

.min-vh-100 {
  min-height: 100vh;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #e57373;
}

input.is-invalid + .invalid-feedback {
  display: block;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

.dias-calendario {
  color: #6c757d;
  border-color: #6c757d !important;
}

.calendar-day.indisponivel {
  background-color: #f0f0f0 !important;
  color: #999 !important;
  border-color: #ddd !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Appointment Cards */
.appointment-card {
  transition: all 0.3s ease;
  border-left: 4px solid var(--theme-primary);
  border-radius: 12px !important;
}

.appointment-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

.status-badge {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.status-badge.confirmado {
  background-color: var(--theme-primary) !important;
  color: white !important;
}

.status-badge.realizado {
  background-color: var(--theme-secondary) !important;
  color: white !important;
}

.status-badge.cancelado {
  background-color: #9ca3af !important;
  color: white !important;
}

.appointment-actions {
  gap: 0.5rem;
}

.appointment-card .btn-outline-danger {
  border-width: 2px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.appointment-card .btn-outline-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {

  .appointment-card {
    margin-bottom: 1.5rem !important;
  }

  .appointment-card .card-body {
    padding: 0.7rem !important;
  }

  .status-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 576px) {
  .appointment-actions {
    flex-direction: column;
  }

  .appointment-actions .btn {
    width: 100%;
  }

  .appointment-card .btn-outline-danger {
    font-size: 0.9rem;
  }
}

/* Block Styles */
.block-item {
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, rgba(248, 249, 250, 0.8) 100%);
  border-left: 4px solid #dc3545 !important;
}

.block-item .text-danger {
  color: #dc3545 !important;
}

.block-item:hover {
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.15) 0%, rgba(248, 249, 250, 0.9) 100%);
}

/* Modal enhancements */
.modal-header {
  background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
  color: white;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Form validation styles */
.form-control.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}

.form-control.is-valid {
  border-color: var(--theme-secondary);
  box-shadow: 0 0 0 0.2rem rgba(var(--theme-secondary-rgb), 0.25);
}

/* Alert customization */
.alert-info {
  background-color: rgba(var(--theme-primary-rgb), 0.1);
  border-color: rgba(var(--theme-primary-rgb), 0.2);
  color: #0c4a6e;
}

/* Menu Cards */
.menu-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.menu-card:not(.coming-soon):hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
}

.menu-card.coming-soon {
  opacity: 0.7;
}

.menu-card .card-body {
  transition: all 0.3s ease;
}

.menu-card:not(.coming-soon):hover .card-body {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.05) 0%, rgba(var(--theme-secondary-rgb), 0.08) 100%);
}

/* Login page styles */
.login-container {
  background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
}

/* Password toggle button */
.position-relative .btn-link {
  color: var(--theme-text) !important;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
}

.position-relative .btn-link:hover {
  color: var(--theme-primary) !important;
}

/* Demo credentials card */
.bg-light {
  background-color: var(--theme-surface) !important;
}

/* Login button loading state */
.btn:disabled {
  opacity: 0.8;
}

/* Responsive adjustments for menu */
@media (max-width: 768px) {

  #barbearia-info {
    margin-bottom: 3rem !important;
  }

  .horarios-tarde {
    margin-bottom: 3rem !important;
  }

  .menu-card .card-body {
    padding: 2rem !important;
  }

  .menu-card i {
    font-size: 3rem !important;
  }

  .display-4 {
    font-size: 2.5rem !important;
  }

  .card-body > .d-flex.gap-3 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: #fff;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    gap: 0.5rem;
  }

  .card-body > .d-flex.gap-3 .btn {
    flex: 1;
  }

   .informacoes-pagamento, .escolha-servico {
    margin-bottom: 5rem !important;
  }
}

.bg-green{
  background-color: var(--theme-mobile-bar-bg) !important;
}

/* Classe para truncar textos e adicionar reticências quando exceder o espaço */
.text-truncate {
    display: inline-block;   /* ou block/flex, dependendo do container */
    max-width: 100%;         /* ocupa todo o espaço disponível do pai */
    white-space: nowrap;     /* evita quebra de linha */
    overflow: hidden;        /* esconde o excesso */
    text-overflow: ellipsis; /* adiciona reticências */
    vertical-align: middle;  /* opcional, para alinhar com ícones ou elementos inline */
}

.btn-page-menu{
  height: 4rem;
}

.btn-outline-primary {
    height: 33px;
  }

.date-picker-trigger {
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.date-picker-trigger:hover {
  background-color: rgba(0, 123, 255, 0.1);
}
