/* === ESTILOS DO SISTEMA DE AGENDAMENTO === */

/* Progress Bar */
.progress-container {
    background: var(--bg-secondary, #f8f9fa);
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color, #dee2e6);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-primary, white);
    border: 3px solid var(--border-color, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--text-muted, #999);
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--success-color, #28a745);
    border-color: transparent;
    color: white;
}

.progress-step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-muted, #999);
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--accent-color, #667eea);
}

/* Container Principal */
.agendamento-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Etapas */
.etapa {
    display: none;
    animation: fadeIn 0.5s ease;
}

.etapa.active {
    display: block;
}

.etapa h3 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--text-primary, #333);
}

.etapa-descricao {
    color: var(--text-secondary, #666);
    margin-bottom: 40px;
    font-size: 1.1em;
}

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

/* ETAPA 1: Grid de Serviços */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.servico-card {
    background: var(--bg-primary, white);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.servico-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--accent-color, #667eea);
}

.servico-card.selecionado {
    border-color: var(--accent-color, #667eea);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.servico-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.servico-card h4 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--text-primary, #333);
}

.servico-descricao {
    color: var(--text-secondary, #666);
    margin-bottom: 20px;
    line-height: 1.5;
}

.servico-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 10px;
}

.servico-duracao,
.servico-preco {
    font-weight: bold;
    color: var(--text-primary, #333);
}

.btn-selecionar {
    width: 100%;
    padding: 12px;
    background: var(--accent-color, #667eea);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-selecionar:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.servico-card.selecionado .btn-selecionar {
    background: var(--success-color, #28a745);
}

/* ETAPA 2: Calendário e Horários */
.calendario-horario-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Calendário */
.calendario-wrapper {
    background: var(--bg-primary, white);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 15px;
    padding: 20px;
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendario-header h4 {
    font-size: 1.3em;
    color: var(--text-primary, #333);
}

.btn-mes {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary, #f8f9fa);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    color: var(--text-primary, #333);
}

.btn-mes:hover {
    background: var(--accent-color, #667eea);
    color: white;
    border-color: var(--accent-color, #667eea);
}

.calendario-dias-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendario-dias-semana div {
    text-align: center;
    font-weight: bold;
    color: var(--text-secondary, #666);
    padding: 10px 0;
    font-size: 0.9em;
}

.calendario-dias {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-primary, #333);
}

.dia:hover:not(.desabilitado):not(.outro-mes) {
    background: var(--bg-secondary, #f8f9fa);
    transform: scale(1.05);
}

.dia.hoje {
    border: 2px solid var(--accent-color, #667eea);
}

.dia.selecionado {
    background: var(--accent-color, #667eea);
    color: white;
}

.dia.desabilitado {
    color: var(--text-muted, #ccc);
    cursor: not-allowed;
    opacity: 0.5;
}

.dia.outro-mes {
    color: var(--text-muted, #ccc);
    opacity: 0.3;
}

/* Horários */
.horarios-wrapper {
    background: var(--bg-primary, white);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 15px;
    padding: 20px;
}

.horarios-wrapper h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--text-primary, #333);
}

.horarios-info {
    background: var(--bg-secondary, #f8f9fa);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.horarios-info p {
    color: var(--text-secondary, #666);
    margin: 0;
}

.horarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.horario-btn {
    padding: 12px;
    background: var(--bg-secondary, #f8f9fa);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    color: var(--text-primary, #333);
}

.horario-btn:hover:not(.indisponivel) {
    background: var(--accent-color, #667eea);
    color: white;
    border-color: var(--accent-color, #667eea);
    transform: translateY(-2px);
}

.horario-btn.selecionado {
    background: var(--success-color, #28a745);
    color: white;
    border-color: var(--success-color, #28a745);
}

.horario-btn.indisponivel {
    background: var(--bg-secondary, #f8f9fa);
    color: var(--text-muted, #999);
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ETAPA 3: Formulário de Dados */
.form-dados {
    background: var(--bg-primary, white);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-primary, #333);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: var(--bg-secondary, #f8f9fa);
    color: var(--text-primary, #333);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--success-color, #28a745);
    background: var(--success-color, #28a745);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.link-termos {
    color: var(--accent-color, #667eea);
    text-decoration: underline;
}

/* ETAPA 4: Resumo e Confirmação */
.resumo-agendamento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.resumo-card {
    background: var(--bg-primary, white);
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.resumo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent-color, #667eea);
}

.resumo-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.resumo-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.resumo-label {
    font-size: 0.85em;
    color: var(--text-muted, #999);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resumo-valor {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-primary, #333);
}

.confirmacao-final {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.confirmacao-aviso {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--accent-color, #667eea);
    border-radius: 10px;
    margin-bottom: 30px;
}

.confirmacao-aviso svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color, #667eea);
    flex-shrink: 0;
}

.confirmacao-aviso p {
    margin: 0;
    color: var(--text-secondary, #666);
    line-height: 1.6;
}

.politica-cancelamento {
    background: var(--bg-primary, white);
    padding: 20px;
    border-radius: 10px;
}

.politica-cancelamento h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary, #333);
    font-size: 1.2em;
}

.politica-cancelamento ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.politica-cancelamento li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

.politica-cancelamento li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color, #28a745);
    font-weight: bold;
}

/* Navegação entre Etapas */
.etapa-navegacao {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.btn-voltar,
.btn-proximo,
.btn-confirmar {
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-voltar {
    background: transparent;
    border: 2px solid var(--border-color, #dee2e6);
    color: var(--text-secondary, #666);
}

.btn-voltar:hover {
    background: var(--bg-secondary, #f8f9fa);
    border-color: var(--text-secondary, #666);
}

.btn-proximo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    flex: 1;
}

.btn-proximo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-proximo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-confirmar {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    flex: 1;
}

.btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

/* Modal de Sucesso */
.modal-sucesso {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-sucesso.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary, white);
    border-radius: 20px;
    padding: 50px;
    max-width: 500px;
    text-align: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.sucesso-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color, #28a745);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3em;
    color: white;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.modal-content h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--text-primary, #333);
}

.modal-content p {
    color: var(--text-secondary, #666);
    margin-bottom: 20px;
    line-height: 1.6;
}

.sucesso-codigo {
    background: var(--bg-secondary, #f8f9fa);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.sucesso-codigo span {
    display: block;
    font-size: 0.9em;
    color: var(--text-secondary, #666);
    margin-bottom: 5px;
}

.sucesso-codigo strong {
    font-size: 1.5em;
    color: var(--accent-color, #667eea);
}

.sucesso-info {
    font-size: 0.9em;
    color: var(--text-muted, #999);
}

.sucesso-acoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.btn-adicionar-calendario,
.btn-novo-agendamento,
.btn-voltar-home {
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-adicionar-calendario {
    background: var(--accent-color, #667eea);
    color: white;
}

.btn-novo-agendamento {
    background: transparent;
    border: 2px solid var(--accent-color, #667eea);
    color: var(--accent-color, #667eea);
}

.btn-voltar-home {
    background: transparent;
    color: var(--text-secondary, #666);
}

.btn-adicionar-calendario:hover,
.btn-novo-agendamento:hover,
.btn-voltar-home:hover {
    transform: translateY(-2px);
}

/* Seção de Ajuda */
.ajuda-section {
    background: var(--bg-secondary, #f8f9fa);
    padding: 60px 20px;
    border-radius: 20px;
    margin-top: 60px;
}

.ajuda-section h3 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
    color: var(--text-primary, #333);
}

.ajuda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.ajuda-card {
    background: var(--bg-primary, white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.ajuda-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.ajuda-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.ajuda-card h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--text-primary, #333);
}

.ajuda-card p {
    color: var(--text-secondary, #666);
    margin: 5px 0;
    line-height: 1.5;
}

.ajuda-card a {
    color: var(--accent-color, #667eea);
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 968px) {
    .calendario-horario-container {
        grid-template-columns: 1fr;
    }

    .horarios-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .progress-bar {
        flex-wrap: wrap;
        gap: 20px;
    }

    .progress-bar::before {
        display: none;
    }

    .servicos-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .resumo-agendamento {
        grid-template-columns: 1fr;
    }

    .etapa-navegacao {
        flex-direction: column;
    }

    .btn-voltar,
    .btn-proximo,
    .btn-confirmar {
        width: 100%;
    }

    .horarios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .step-label {
        font-size: 0.75em;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .calendario-dias-semana div {
        font-size: 0.8em;
        padding: 8px 0;
    }

    .dia {
        font-size: 0.9em;
    }

    .ajuda-grid {
        grid-template-columns: 1fr;
    }
}