/* ==================== COPILOTO IA - ESTILOS ==================== */

/* Botão Flutuante (FAB) */
.copiloto-fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(20,184,166,0.4);
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.copiloto-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(20,184,166,0.5);
}
.copiloto-fab.ativo {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 30px rgba(239,68,68,0.4);
}
.copiloto-fab.ativo i::before {
    content: "\f00d"; /* fa-times */
}

/* Painel Principal */
.copiloto-panel {
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 420px;
    max-height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 1002;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
.copiloto-panel.aberto {
    display: flex;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.copiloto-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.copiloto-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.copiloto-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}
.copiloto-header h3 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}
.copiloto-status {
    color: #5eead4;
    font-size: 0.75rem;
    font-weight: 500;
}
.copiloto-btn-minimize {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.copiloto-btn-minimize:hover {
    background: rgba(255,255,255,0.2);
}

/* Body */
.copiloto-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
    flex: 1;
}

/* Welcome */
.copiloto-welcome {
    text-align: center;
    padding: 10px 0 20px;
}
.copiloto-welcome-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(20,184,166,0.1), rgba(14,165,233,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: #14b8a6;
}
.copiloto-welcome h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.copiloto-welcome p {
    color: #64748b;
    font-size: 0.85rem;
}

/* Opções */
.copiloto-opcoes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.copiloto-opcao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.copiloto-opcao:hover {
    border-color: #14b8a6;
    background: #f0fdfa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20,184,166,0.1);
}
.copiloto-opcao i {
    font-size: 1.3rem;
    color: #14b8a6;
}
.copiloto-opcao span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

/* Formulários */
.copiloto-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.copiloto-form-header h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin: 0;
}
.copiloto-form-header h4 i {
    color: #14b8a6;
    margin-right: 6px;
}
.copiloto-back {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}
.copiloto-back:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.copiloto-field {
    margin-bottom: 14px;
}
.copiloto-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.copiloto-field input,
.copiloto-field textarea,
.copiloto-field select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: #f8fafc;
    resize: vertical;
}
.copiloto-field input:focus,
.copiloto-field textarea:focus,
.copiloto-field select:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
    background: white;
}
.copiloto-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.copiloto-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}
.copiloto-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20,184,166,0.3);
}

/* Loading */
.copiloto-loading {
    text-align: center;
    padding: 40px 20px;
}
.copiloto-loading-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e2e8f0;
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.copiloto-loading p {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.copiloto-loading span {
    color: #64748b;
    font-size: 0.8rem;
}

/* Resultado */
.copiloto-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.copiloto-copy {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.copiloto-copy:hover {
    background: #14b8a6;
    color: white;
}
.copiloto-result-content {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #374151;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}
.copiloto-result-content h3.copiloto-h3 {
    font-size: 0.95rem;
    color: #0f172a;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #14b8a6;
}
.copiloto-result-content h4.copiloto-h4 {
    font-size: 0.88rem;
    color: #1e293b;
    margin: 12px 0 6px;
}
.copiloto-result-content li {
    margin-left: 16px;
    margin-bottom: 4px;
}
.copiloto-result-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}
.copiloto-result-footer small {
    color: #94a3b8;
    font-size: 0.75rem;
}
.copiloto-result-footer small i {
    margin-right: 4px;
}

/* Erro */
.copiloto-erro {
    text-align: center;
    padding: 30px 20px;
}
.copiloto-erro i {
    font-size: 2.5rem;
    color: #f59e0b;
    margin-bottom: 12px;
}
.copiloto-erro p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Responsivo */
@media (max-width: 480px) {
    .copiloto-panel {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 150px;
        max-height: 60vh;
    }
    .copiloto-fab {
        bottom: 85px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 20px;
    }
}
