/**
 * SISTEMA DE AGENDAMENTO MODERNO - FRONTEND
 * Estilos para o shortcode [agendamento_moderno]
 * Baseado no design do Cal.com com tema escuro moderno
 */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --cafe-primary: #5E3A1E;
    --cafe-secondary: #D4A76A;
    --cafe-light: #fffbe9;
    --cafe-muted: #7a5a36;
    --cafe-bg: rgba(255, 255, 255, 0.95);
    --cafe-border: rgba(212, 167, 106, 0.3);
    --cafe-shadow: 0 4px 6px rgba(94, 58, 30, 0.1);
    --cafe-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Cores do tema escuro */
    --dark-bg: #0a0a0a;
    --dark-surface: #1a1a1a;
    --dark-surface-2: #2a2a2a;
    --dark-text: #ffffff;
    --dark-text-secondary: #a0a0a0;
    --dark-border: #333333;
    --dark-accent: #10b981;
    --dark-accent-hover: #059669;
}

/* ===== CONTAINER PRINCIPAL ===== */
.agendamento-moderno {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--dark-bg);
    color: var(--dark-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* ===== PASSOS DO AGENDAMENTO ===== */
.passo-agendamento {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.passo-agendamento[data-passo="1"] {
    display: block;
}

.passo-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.passo-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--cafe-secondary), var(--cafe-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.passo-header p {
    font-size: 1.1rem;
    color: var(--dark-text-secondary);
    margin: 0;
}

/* ===== BOTÃO VOLTAR ===== */
.btn-voltar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--cafe-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-voltar:hover {
    background: var(--dark-surface);
    color: var(--dark-text);
}

/* ===== TIPOS DE SERVIÇO ===== */
.tipos-servico-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tipo-servico-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: var(--cafe-transition);
    position: relative;
    overflow: hidden;
}

.tipo-servico-card:hover {
    transform: translateY(-4px);
    border-color: var(--cafe-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tipo-servico-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cafe-secondary), var(--cafe-primary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tipo-servico-card:hover:before {
    transform: scaleX(1);
}

.tipo-servico-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Estilos para ícones Dashicons */
.tipo-servico-icon .dashicons {
    font-size: 3rem;
    width: auto;
    height: auto;
    line-height: 1;
}

.tipo-servico-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.tipo-servico-content p {
    color: var(--dark-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.tipo-servico-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-text-secondary);
    font-size: 1.2rem;
    transition: var(--cafe-transition);
}

.tipo-servico-card:hover .tipo-servico-arrow {
    color: var(--cafe-secondary);
    transform: translateY(-50%) translateX(4px);
}

/* ===== PROFISSIONAIS ===== */
.profissionais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.profissional-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--cafe-transition);
    text-align: center;
}

.profissional-card:hover {
    transform: translateY(-4px);
    border-color: var(--cafe-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profissional-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: var(--cafe-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--dark-text);
}

.profissional-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.profissional-info p {
    color: var(--dark-text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* ===== AGENDA ===== */
.agenda-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.agenda-info {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

.profissional-selecionado {
    text-align: center;
}

.profissional-selecionado .profissional-foto {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.profissional-selecionado h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.profissional-selecionado p {
    color: var(--dark-text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* ===== CALENDÁRIO ===== */
.agenda-calendario {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

.calendario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.btn-mes {
    background: none;
    border: none;
    color: var(--dark-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--cafe-transition);
}

.btn-mes:hover {
    background: var(--dark-surface-2);
    color: var(--dark-text);
}

.calendario-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
}

.dias-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dias-semana span {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-text-secondary);
    padding: 0.5rem;
}

.dias-calendario {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.dia-calendario {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--cafe-transition);
    position: relative;
    font-weight: 500;
}

.dia-calendario:hover {
    background: var(--dark-surface-2);
}

.dia-calendario.selecionado {
    background: var(--dark-accent);
    color: var(--dark-text);
}

.dia-calendario.disponivel {
    color: var(--dark-text);
}

.dia-calendario.indisponivel {
    color: var(--dark-text-secondary);
    cursor: not-allowed;
}

.dia-calendario.evento::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--cafe-secondary);
    border-radius: 50%;
}

/* ===== HORÁRIOS ===== */
.agenda-horarios {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

.horarios-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dark-border);
}

.horarios-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
}

.formato-hora {
    display: flex;
    background: var(--dark-surface-2);
    border-radius: 8px;
    padding: 0.25rem;
}

.btn-formato {
    background: none;
    border: none;
    color: var(--dark-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--cafe-transition);
    font-size: 0.9rem;
}

.btn-formato.ativo {
    background: var(--dark-accent);
    color: var(--dark-text);
}

.horarios-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.horario-item {
    background: var(--dark-surface-2);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: var(--cafe-transition);
    position: relative;
}

.horario-item:hover {
    border-color: var(--cafe-secondary);
    transform: translateY(-2px);
}

.horario-item::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--cafe-secondary);
    border-radius: 50%;
}

.horario-item.ocupado {
    opacity: 0.5;
    cursor: not-allowed;
}

.horario-item.ocupado:hover {
    transform: none;
    border-color: var(--dark-border);
}

.horario-item.ocupado::before {
    background: var(--dark-text-secondary);
}

/* ===== CONFIRMAÇÃO ===== */
.confirmacao-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.detalhes-reuniao {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

.profissional-info {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dark-border);
}

.reuniao-detalhes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detalhe-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark-text-secondary);
}

.detalhe-item i {
    width: 20px;
    color: var(--cafe-secondary);
}

/* ===== FORMULÁRIO ===== */
.formulario-confirmacao {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

/* ===== TÍTULOS DO FORMULÁRIO ===== */
.formulario-confirmacao h2,
.formulario-confirmacao h3,
.formulario-confirmacao h4,
.formulario-confirmacao h5,
.formulario-confirmacao h6 {
    color: var(--dark-text) !important;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.formulario-confirmacao h2 {
    font-size: 1.8rem;
    color: var(--cafe-secondary) !important;
    border-bottom: 2px solid var(--cafe-secondary);
    padding-bottom: 0.5rem;
}

.formulario-confirmacao h3 {
    font-size: 1.4rem;
    color: var(--dark-text) !important;
}

.formulario-confirmacao h4 {
    font-size: 1.2rem;
    color: var(--dark-text) !important;
}

/* ===== TÍTULOS GERAIS DO FORMULÁRIO ===== */
.agendamento-moderno h1,
.agendamento-moderno h2,
.agendamento-moderno h3,
.agendamento-moderno h4,
.agendamento-moderno h5,
.agendamento-moderno h6 {
    color: var(--dark-text) !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== TÍTULOS ESPECÍFICOS ===== */
.confirmacao-container h2,
.confirmacao-container h3,
.confirmacao-container h4 {
    color: var(--dark-text) !important;
    margin-bottom: 1rem;
}

.detalhes-reuniao h3,
.detalhes-reuniao h4 {
    color: var(--dark-text) !important;
    margin-bottom: 1rem;
}

/* ===== TÍTULOS DOS PASSOS ===== */
.passo-agendamento h2,
.passo-agendamento h3,
.passo-agendamento h4 {
    color: var(--dark-text) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== CAMPOS DO FORMULÁRIO ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-text) !important;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-surface-2);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--dark-text) !important;
    font-size: 1rem;
    transition: var(--cafe-transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cafe-secondary);
    box-shadow: 0 0 0 3px rgba(212, 167, 106, 0.1), inset 0 1px 3px rgba(0, 0, 0, 0.2);
    background: var(--dark-surface);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--dark-text-secondary) !important;
    opacity: 0.8;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-participantes {
    background: none;
    border: 1px solid var(--dark-border);
    color: var(--dark-text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--cafe-transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-participantes:hover {
    border-color: var(--cafe-secondary);
    color: var(--cafe-secondary);
}

.termos-uso {
    font-size: 0.9rem;
    color: var(--dark-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.termos-uso a {
    color: var(--cafe-secondary);
    text-decoration: none;
}

.termos-uso a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-confirmar {
    background: var(--dark-accent);
    color: var(--dark-text);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cafe-transition);
    flex: 1;
}

.btn-confirmar:hover {
    background: var(--dark-accent-hover);
    transform: translateY(-2px);
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--dark-text);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--cafe-secondary);
    margin-bottom: 1rem;
}

/* ===== MENSAGENS ===== */
.mensagens-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    max-width: 400px;
}

.mensagem {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.mensagem.sucesso {
    border-left: 4px solid var(--dark-accent);
}

.mensagem.erro {
    border-left: 4px solid #ef4444;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .agenda-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .confirmacao-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .agendamento-moderno {
        padding: 1rem;
    }
    
    .passo-header h2 {
        font-size: 2rem;
    }
    
    .tipos-servico-grid {
        grid-template-columns: 1fr;
    }
    
    .profissionais-grid {
        grid-template-columns: 1fr;
    }
    
    .dias-semana,
    .dias-calendario {
        gap: 0.25rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-voltar {
        position: relative;
        transform: none;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .passo-header h2 {
        font-size: 1.5rem;
    }
    
    .tipo-servico-card,
    .profissional-card {
        padding: 1rem;
    }
    
    .agenda-calendario,
    .agenda-horarios,
    .detalhes-reuniao,
    .formulario-confirmacao {
        padding: 1rem;
    }
}

/* ===== FUNCIONALIDADE DE PARTICIPANTES ===== */
.participantes-container {
    background: var(--dark-surface-2);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.participantes-container h4 {
    color: var(--cafe-secondary) !important;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.participantes-descricao {
    color: var(--dark-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.participantes-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.participante-item {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.participante-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark-border);
}

.participante-header h5 {
    color: var(--dark-text) !important;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.btn-remover-participante {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--cafe-transition);
}

.btn-remover-participante:hover {
    background: #c82333;
    transform: scale(1.05);
}

.participante-campos .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-adicionar-participante {
    background: var(--cafe-secondary);
    color: var(--dark-text);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--cafe-transition);
    width: 100%;
    margin-bottom: 1rem;
}

.btn-adicionar-participante:hover {
    background: var(--cafe-primary);
    transform: translateY(-2px);
}

.btn-voltar-simples {
    background: var(--dark-surface-2);
    color: var(--dark-text-secondary);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--cafe-transition);
    width: 100%;
}

.btn-voltar-simples:hover {
    background: var(--dark-surface);
    color: var(--dark-text);
}

.btn-participantes.ativo {
    background: var(--cafe-primary);
    color: var(--dark-text);
}

/* ===== RESPONSIVIDADE PARA PARTICIPANTES ===== */
@media (max-width: 768px) {
    .participante-campos .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .participantes-container {
        padding: 1rem;
    }
    
    .participante-item {
        padding: 0.75rem;
    }
}