/**
 * Estilos adicionais para a página de cadastro e edição
 */

/* Estilos para sistema de steps */
.step-indicator {
    position: relative;
    padding-top: 25px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease-in-out;
}

.step-indicator.active {
    font-weight: 600;
    color: #0d6efd;
}

.step-indicator::before {
    content: attr(data-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.step-indicator.active::before {
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
}

.step-indicator.text-success::before {
    background-color: #198754;
    color: white;
}

/* Transição suave entre steps */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out forwards;
}

/* Estilo para leitor de impressão digital */
#fingerprint-reader {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

#fingerprint-reader:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dde0e3 100%);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.15);
}

/* Animação de escaneamento para impressão digital */
@keyframes scan {
    0% { transform: translateY(0); opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { transform: translateY(180px); opacity: 0.5; }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0d6efd;
    animation: scan 2s infinite;
    z-index: 1;
}

/* Estilo para canvas de assinatura */
#canvasAssinatura {
    cursor: crosshair;
    background-color: #fff;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#canvasAssinatura:hover {
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2);
}

/* Estilo para botões de ação */
.btn-next, .btn-prev {
    min-width: 120px;
    transition: all 0.3s ease;
}

.btn-next:hover {
    transform: translateX(3px);
}

.btn-prev:hover {
    transform: translateX(-3px);
}

/* Estilo para imagens preview */
.img-fluid {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* Estilo para o spinner de carregamento */
.spinner-border, .spinner-grow {
    width: 3rem;
    height: 3rem;
}

/* Estilo para alertas */
.alert {
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.alert-success {
    background-color: #e8f6e8;
    border-color: #d4e8d4;
    color: #3a773a;
}

.alert-danger {
    background-color: #f8e8e8;
    border-color: #e8d4d4;
    color: #773a3a;
}

.alert-warning {
    background-color: #fff9e6;
    border-color: #ffe7a0;
    color: #997404;
}

.alert-info {
    background-color: #e6f3ff;
    border-color: #b3d7ff;
    color: #0c63e4;
}

/* Estilo para o toast de notificação */
.toast {
    min-width: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: none;
    opacity: 1;
}

.toast-header {
    border-bottom: none;
    padding: 0.75rem 1rem;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.toast-body {
    padding: 1rem;
    font-size: 0.9rem;
}

/* Estilos para o painel de confirmação */
.confirm-panel {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.confirm-panel:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.confirm-panel .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 1rem;
}

.confirm-panel table th {
    width: 40%;
    color: #495057;
}

/* Placeholder para foto e assinatura */
.foto-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 64px;
    margin: 0 auto;
}

.assinatura-placeholder {
    width: 300px;
    height: 100px;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: bold;
    font-style: italic;
    margin: 0 auto;
}

/* Animação das notificações */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
    animation: slideInRight 0.3s forwards;
}

/* Estilos para inputs com validação */
.form-control.is-invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='5'/%3e%3cpath stroke-linecap='round' d='M6 3v3'/%3e%3cpath stroke-linecap='round' d='M6 9h.01'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Responsividade */
@media (max-width: 768px) {
    .step-indicator {
        font-size: 0.8rem;
        padding-top: 22px;
    }

    .step-indicator::before {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }

    .btn-next, .btn-prev {
        min-width: auto;
        padding: 0.375rem 0.75rem;
    }

    .btn-icon-only {
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .card-header div {
        margin-top: 10px;
        width: 100%;
    }

    .card-header .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    #canvasAssinatura {
        width: 100%;
        max-width: 320px;
        height: 120px;
    }
}