/* =========================================================
   style.css
   Sistema de Agendamento - D'Freitas Stylus
   Tema: preto + dourado, inspirado na identidade da marca
   ========================================================= */

:root {
    --preto: #000000;
    --superficie: #121212;
    --superficie-alt: #1a1a1a;
    --dourado: #c9a227;
    --dourado-claro: #e0bc4a;
    --texto: #f2ede3;
    --texto-suave: #a89f8f;
    --borda: #2b2b2b;
    --sucesso: #3fa34d;
    --sucesso-fundo: #12261a;
    --erro: #e2574c;
    --erro-fundo: #2a1414;
    --sombra: 0 4px 20px rgba(0, 0, 0, 0.5);
    --raio: 12px;
    --fonte-titulo: 'Playfair Display', Georgia, serif;
    --fonte: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--fonte);
    background: var(--preto);
    color: var(--texto);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

/* ===================== TOPO ===================== */
.topo {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    border-bottom: 1px solid var(--borda);
    color: var(--texto);
    padding: 28px 20px 40px;
    text-align: center;
}

.topo-conteudo {
    max-width: 700px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-imagem {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.topo-subtitulo {
    color: var(--texto-suave);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--fonte-titulo);
    font-style: italic;
    letter-spacing: 0.3px;
}

/* ===================== CONTAINER ===================== */
.container {
    max-width: 700px;
    margin: -24px auto 40px;
    padding: 0 16px;
}

/* ===================== STEPPER ===================== */
.stepper {
    display: flex;
    justify-content: space-between;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 18px 12px;
    margin-bottom: 20px;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--texto-suave);
    font-weight: 500;
    position: relative;
}

.step-numero {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--superficie-alt);
    border: 1px solid var(--borda);
    color: var(--texto-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.step-item.active .step-numero {
    background: var(--dourado);
    border-color: var(--dourado);
    color: #000;
}

.step-item.concluido .step-numero {
    background: transparent;
    border-color: var(--dourado);
    color: var(--dourado);
}

.step-item.active .step-nome,
.step-item.concluido .step-nome {
    color: var(--texto);
}

/* ===================== PAINÉIS DE ETAPA ===================== */
.step-panel {
    display: none;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 24px 20px;
    animation: fadeIn 0.35s ease;
}

.step-panel.active {
    display: block;
}

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

.step-titulo {
    font-family: var(--fonte-titulo);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--texto);
}

.btn-voltar {
    background: none;
    border: none;
    color: var(--texto-suave);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.btn-voltar:hover {
    color: var(--dourado);
}

/* ===================== CARDS DE SELEÇÃO ===================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.card-select {
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--superficie-alt);
}

.card-select:hover {
    border-color: var(--dourado);
    transform: translateY(-2px);
}

.card-select.selecionado {
    border-color: var(--dourado);
    background: #1d1a0f;
    box-shadow: 0 0 0 1px var(--dourado);
}

.card-icone {
    font-size: 26px;
    margin-bottom: 8px;
}

.card-foto-barbeiro {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--borda);
    margin: 0 auto 10px;
    display: block;
}

.card-select-barbeiro.selecionado .card-foto-barbeiro {
    border-color: var(--dourado);
}

.card-select h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 4px;
}

.card-detalhe {
    font-size: 12.5px;
    color: var(--texto-suave);
}

.aviso {
    color: var(--texto-suave);
    font-size: 14px;
    text-align: center;
    padding: 16px 0;
}

/* ===================== DATA E HORÁRIOS ===================== */
.label-campo {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--texto);
    margin-bottom: 8px;
}

.input-data,
.input-texto {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 13px 10px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-family: var(--fonte);
    font-size: 16px;
    color: var(--texto);
    background: var(--superficie-alt);
    margin-bottom: 18px;
    transition: border-color 0.2s ease;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}

.input-data {
    /* Evita que o ícone/campo nativo de data seja cortado em telas
       estreitas, garantindo que o texto e o ícone caibam. */
    display: block;
}

.input-data:focus,
.input-texto:focus {
    outline: none;
    border-color: var(--dourado);
}

.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.horario-item {
    padding: 12px 6px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    background: var(--superficie-alt);
    font-family: var(--fonte);
    font-size: 14px;
    font-weight: 500;
    color: var(--texto);
    cursor: pointer;
    transition: all 0.2s ease;
}

.horario-item:hover {
    border-color: var(--dourado);
}

.horario-item.selecionado {
    background: var(--dourado);
    border-color: var(--dourado);
    color: #000;
    font-weight: 600;
}

/* ===================== RESUMO ===================== */
.resumo-box {
    background: var(--superficie-alt);
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--borda);
}

.resumo-linha:last-child {
    border-bottom: none;
}

.resumo-linha span {
    color: var(--texto-suave);
}

.resumo-linha strong {
    color: var(--texto);
    font-weight: 600;
    text-align: right;
}

/* ===================== FORMULÁRIO ===================== */
#form-agendamento {
    margin-top: 4px;
}

.erro-form {
    display: none;
    color: #ff8079;
    font-size: 13px;
    margin: -8px 0 14px;
    font-weight: 500;
}

.btn-confirmar {
    width: 100%;
    padding: 15px;
    background: var(--dourado);
    color: #000;
    border: none;
    border-radius: 10px;
    font-family: var(--fonte);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 4px;
}

.btn-confirmar:hover {
    background: var(--dourado-claro);
}

.btn-confirmar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: #06210f;
    border: none;
    border-radius: 10px;
    font-family: var(--fonte);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    transition: background 0.2s ease;
}

.btn-whatsapp:hover {
    background: #1ebe5b;
}

/* ===================== CONFIRMAÇÃO FINAL ===================== */
.confirmacao-box {
    text-align: center;
    padding: 10px 0 24px;
}

.check-icone {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sucesso);
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirmacao-box h2 {
    font-family: var(--fonte-titulo);
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--texto);
}

.confirmacao-texto {
    color: var(--texto-suave);
    font-size: 14px;
    margin-bottom: 18px;
}

.confirmacao-box .resumo-box {
    text-align: left;
    margin-bottom: 18px;
}

.confirmacao-aviso {
    font-size: 13px;
    color: var(--texto-suave);
}

/* ===================== BOTÃO FLUTUANTE DO WHATSAPP ===================== */
.whatsapp-flutuante {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: transform 0.2s ease;
}

.whatsapp-flutuante:hover {
    transform: scale(1.08);
}

/* ===================== RODAPÉ ===================== */
.rodape {
    text-align: center;
    padding: 24px 16px 90px;
    font-size: 12.5px;
    color: var(--texto-suave);
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 480px) {
    .topo {
        padding: 22px 16px 32px;
    }

    .logo-imagem {
        width: 76px;
        height: 76px;
    }

    .container {
        margin-top: -20px;
        padding: 0 12px;
    }

    .step-panel {
        padding: 20px 16px;
    }

    .step-item {
        font-size: 10px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .horarios-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .whatsapp-flutuante {
        right: 14px;
        bottom: 14px;
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 600px) {
    .step-panel {
        padding: 32px 36px;
    }
}
