/* Black & White Theme for Django UI */
:root {
  --bg: #0b0b0b;
  --bg-elev: #121212;
  --bg-soft: #171717;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --border: #2a2a2a;
  --accent: #ffffff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.table-success {
    background-color: rgba(25, 135, 84, 0.9) !important;
    color: white !important;
    border-left: 4px solid #146c43 !important;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.9) !important;
    color: white !important;
    border-left: 4px solid #b02a37 !important;
}

.table-warning {
    background-color: rgba(255, 193, 7, 0.9) !important;
    color: black !important;
    border-left: 4px solid #d39e00 !important;
}

.table-secondary {
    background-color: rgba(108, 117, 125, 0.9) !important;
    color: white !important;
    border-left: 4px solid #565e64 !important;
}

/* Efeito de brilho suave no hover */
#slotsTable tbody tr:hover {
    filter: brightness(1.05);
    transform: translateX(2px);
}

.form-text { color: var(--muted); }

/* Bootstrap overrides (grayscale) */
.m-2 { margin: 0.8rem !important; }
.valor{ color: rgb(0, 184, 0) !important; }
.text-primary { color: var(--accent) !important; }
.bg-dark { background-color: var(--bg-elev) !important; }
.border-secondary { border-color: var(--border) !important; }
.btn, .btn:focus { box-shadow: none !important; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #000; }
.btn-primary:hover { filter: brightness(0.9); color: #000; }
.btn-outline-primary { color: var(--accent); border: 2px solid rgb(255, 255, 255); background-color: rgb(14, 127, 255); }
  #animation {
    position: relative;
    overflow: hidden;
    display: inline-block;
  }

  #animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: shine 2s infinite;
  }

  @keyframes shine {
    0% {
      left: -75%;
    }
    100% {
      left: 125%;
    }
  }
.btn-outline-primary:hover { background: var(--accent); color: #000; }

.header { background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.navbar-brand { text-decoration: none; font-weight: 700; }
.logo-barber{ width: 70px; height: 70px; }
.nav-link { color: var(--text) !important; font-weight: 500; }
.nav-link:hover { color: var(--accent) !important; }

.hero { background: linear-gradient(135deg, var(--bg) 0%, var(--bg-soft) 100%); }
.min-vh-75 { min-height: 75vh; }
.hero-placeholder { border: 1px dashed var(--border); }

.card { background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); }
.card-title { color: var(--text); }
.card-text, .text-muted { color: var(--muted) !important; }
.service-card:hover, .barber-card:hover, .contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.barber-image { width: 8rem; height: 8rem; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.barber-image img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-image { width: 8rem; height: 8rem; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; }

.modal-content { background: var(--bg-elev); border: 1px solid var(--border); }
.modal-header { border-bottom-color: var(--border); }
.btn-close.btn-close-white { filter: invert(1); }

.booking-card, .date-btn, .time-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: .5rem;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.booking-card:hover, .date-btn:hover, .time-btn:hover { border-color: var(--accent); }
.booking-card.selected, .date-btn.selected, .time-btn.selected { background: var(--accent); color: #000; border-color: var(--accent); }

.form-control { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.form-control::placeholder { color: var(--muted); }
.form-control:focus { background: var(--bg-soft); border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 .2rem rgba(255,255,255,0.08); }
.form-label { color: var(--text); font-weight: 500; }

.footer { background: var(--bg-elev) !important; border-top: 1px solid var(--border); }

.contact-icon { width: 2rem; height: 2rem; }
.loading { opacity: .6; pointer-events: none; }

.fade-in { animation: fadeIn .6s ease-out both; }
.slide-up { animation: slideUp .6s ease-out both; }
.scale-in { animation: scaleIn .35s ease-out both; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{opacity:0; transform: translateY(12px)} to{opacity:1; transform: translateY(0)} }
@keyframes scaleIn { from{opacity:0; transform:scale(.96)} to{opacity:1; transform:scale(1)} }

@media (max-width: 768px) { .barber-image, .placeholder-image { width: 6rem; height: 6rem; } }

/* Barber area fullscreen on mobile */
@media (max-width: 768px) {
  body.barber-area .header, body.barber-area .footer { display: none !important; }
  body.barber-area main { min-height: 100vh; padding: 0; }
  .img-fluid { width: 80%; height: auto; }
  .min-vh-75 { min-height: 25vh; }
  #slotsTable td {
        padding: 8px 4px;
        font-size: 0.9em;
    }
    
    #slotsTable td strong {
        font-size: 1em;
    }
    
    .table-success,
    .table-danger,
    .table-warning,
    .table-secondary {
        border-left-width: 3px !important;
    }
    .g-2{
        --bs-gutter-x: 0.1rem;
        --bs-gutter-y: 0.5rem;
    }
    .col-6 {
        flex: 0 0 auto;
        width: 25%;
    }
    .time-btn{
        width: 80px;
    }
}

/* Utilities */
.text-success { color: #5bd66f !important; }
.text-danger { color: #ff6b6b !important; }

/* Subtle glow animation for primary CTA */
.btn-glow { transition: box-shadow .25s ease, transform .2s ease; }
.btn-glow:hover { box-shadow: 0 0 24px rgba(255,255,255,0.25); transform: translateY(-1px); }

/* Step tracker */
.step-item { opacity: .7; }
.step-item.active { opacity: 1; }
.step-item.completed { opacity: 1; }
.step-circle { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--text); font-weight: 600; }
.step-item.active .step-circle { border-color: var(--accent); box-shadow: 0 0 0 .15rem rgba(255,255,255,0.12); }
.step-item.completed .step-circle { background: var(--accent); color: #000; border-color: var(--accent); }
.step-divider { height: 2px; background: var(--border); flex: 0 0 16px; align-self: center; }
.step-label { color: var(--muted); }
.step-item.active .step-label, .step-item.completed .step-label { color: var(--text); }

/* Calendar grid */
.grid-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.grid-7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.calendar-header.grid-7 .cal-weekday.dom {
    color: #dc3545; /* Vermelho para domingo */
}

.cal-cell .cal-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cal-cell .cal-day.today {
    background-color: #0d6efd;
    color: white;
}

.cal-cell .cal-day.selected {
    background-color: #198754;
    color: white;
}
.cal-weekday { text-align: center; color: var(--muted); font-size: .875rem; }
.calendar-grid { min-height: 200px; }
.cal-cell { min-height: 48px; }
.cal-day { background: var(--bg-soft); border: 1px solid var(--border); border-radius: .5rem; padding: .5rem; text-align: center; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.today { outline: 1px dashed var(--accent); }
.cal-day.selected { background: var(--accent); color: #000; border-color: var(--accent); }
.cal-day.disabled { opacity: .4; cursor: not-allowed; }

/* Mobile navbar toggler (3 bars) to white */
.navbar-toggler { border-color: rgba(255,255,255,0.9); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,0.25); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255, 0.95)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

/* Square helper for 1:1 images */
.ratio.ratio-1x1 { position: relative; width: 100%; }
.ratio.ratio-1x1::before { content: ""; display: block; padding-top: 100%; }
.ratio.ratio-1x1 > img, .ratio.ratio-1x1 > div { position:absolute; inset:0; }


.cal-day.disabled {
    background-color: #1a1a1a; /* mais escuro que bg-soft */
    color: #555;               /* texto cinza escuro */
    cursor: not-allowed;
    pointer-events: none;      /* previne clique */
    opacity: 0.7;
    border-color: #2a2a2a;    /* mantém contraste com outros dias */
}


/*select*/
.custom-select {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: .5rem;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23f5f5f5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(255,255,255,0.08);
    background-color: var(--bg-soft);
}

.custom-select:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.custom-select option {
    background: var(--bg-elev);
    color: var(--text);
    padding: 0.5rem;
}

/* Para garantir que o select fique consistente em diferentes browsers */
.custom-select::-ms-expand {
    display: none;
}

/* Efeito de loading/seleção */
.custom-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.calendar {
    background: #2d3748;
    border-radius: 8px;
    padding: 1rem;
}

.cal-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a0aec0;
    padding: 0.5rem 0;
}

.cal-weekday.dom {
    color: #fc8181;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cal-day:hover:not(.disabled) {
    background-color: #4a5568;
    border-color: #718096;
}

.cal-day.sunday:not(.disabled) {
    color: #fc8181;
}

.cal-day.today {
    background-color: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
}

.cal-day.selected {
    background-color: #38a169;
    color: white;
    border-color: #38a169;
}

.cal-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #718096;
}

.sunday-row {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.sunday-row:hover {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

/* Manter as cores originais mas com fundo diferenciado para domingo */
.sunday-row.table-success {
    background-color: rgba(25, 135, 84, 0.8) !important;
}

.sunday-row.table-warning {
    background-color: rgba(255, 193, 7, 0.8) !important;
}

.sunday-row.table-danger {
    background-color: rgba(220, 53, 69, 0.8) !important;
}

