/**
 * Stili per i componenti WebAuthn
 */

.webauthn-container {
    max-width: 500px;
    margin: 20px 0;
    padding: 25px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.webauthn-container h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.4em;
}

.webauthn-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    outline: none;
}

.webauthn-button:hover {
    background-color: #135e96;
    transform: translateY(-2px);
}

.webauthn-button:active {
    transform: translateY(0);
}

.webauthn-button:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

.webauthn-status {
    margin: 15px 0;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.webauthn-status.info {
    background-color: #e5f5fa;
    border-left: 4px solid #00a0d2;
    color: #0a648f;
}

.webauthn-status.success {
    background-color: #ecf7ed;
    border-left: 4px solid #46b450;
    color: #2a7530;
}

.webauthn-status.error {
    background-color: #fbeaea;
    border-left: 4px solid #dc3232;
    color: #8a2424;
}

.webauthn-notice {
    padding: 12px;
    background-color: #f0f0f1;
    border-left: 4px solid #72aee6;
    color: #3c434a;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
}

.webauthn-error {
    padding: 12px;
    background-color: #fbeaea;
    border-left: 4px solid #dc3232;
    color: #8a2424;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
}

/* Animazione durante il caricamento */
.webauthn-button.loading {
    position: relative;
    color: transparent;
}

.webauthn-button.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    animation: webauthn-spin 1s infinite linear;
}

@keyframes webauthn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsività */
@media (max-width: 600px) {
    .webauthn-container {
        padding: 15px;
    }
    
    .webauthn-button {
        width: 100%;
    }
}
