/**
 * Passkey Authentication - Styles
 * Modern, clean UI with smooth animations
 */

.passkey-auth-wrapper {
    margin: 20px 0;
}

/* Separator */
.passkey-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
}

.passkey-separator::before,
.passkey-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dcdcde;
}

.passkey-separator span {
    padding: 0 16px;
    color: #646970;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Main passkey button */
.passkey-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.passkey-button:hover:not(:disabled) {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.passkey-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.passkey-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Icon */
.passkey-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.passkey-button:hover:not(:disabled) .passkey-icon {
    transform: scale(1.1);
}

/* Loading state */
.passkey-button.loading {
    position: relative;
    color: transparent;
}

.passkey-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: passkey-spin 0.8s linear infinite;
}

@keyframes passkey-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.passkey-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: passkey-slidein 0.3s ease;
}

@keyframes passkey-slidein {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.passkey-message-info {
    background: #e5f5fa;
    color: #135e96;
    border-left: 4px solid #2271b1;
}

.passkey-message-success {
    background: #edfaef;
    color: #1e7b34;
    border-left: 4px solid #2ea44f;
}

.passkey-message-error {
    background: #ffe8e8;
    color: #d63638;
    border-left: 4px solid #d63638;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .passkey-button {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .passkey-icon {
        width: 22px;
        height: 22px;
    }
}

/* Dark mode support (for custom login pages) */
@media (prefers-color-scheme: dark) {
    .passkey-separator::before,
    .passkey-separator::after {
        border-bottom-color: #3c434a;
    }
    
    .passkey-separator span {
        color: #a7aaad;
    }
}

/* Alternative style - Outline button */
.passkey-button.passkey-button-outline {
    background: transparent;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.passkey-button.passkey-button-outline:hover:not(:disabled) {
    background: #2271b1;
    color: #fff;
}

/* Alternative style - Minimal button */
.passkey-button.passkey-button-minimal {
    background: #f6f7f7;
    color: #2c3338;
    border: 1px solid #dcdcde;
}

.passkey-button.passkey-button-minimal:hover:not(:disabled) {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
}

/* Passkey management table (for user profile page) */
.passkey-devices-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.passkey-devices-table th,
.passkey-devices-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dcdcde;
}

.passkey-devices-table th {
    font-weight: 600;
    color: #2c3338;
    background: #f6f7f7;
}

.passkey-devices-table tr:hover {
    background: #f9f9f9;
}

.passkey-device-actions {
    display: flex;
    gap: 8px;
}

.passkey-remove-btn {
    padding: 6px 12px;
    font-size: 13px;
    color: #d63638;
    background: transparent;
    border: 1px solid #d63638;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.passkey-remove-btn:hover {
    background: #d63638;
    color: #fff;
}

/* Empty state */
.passkey-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.passkey-empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.passkey-empty-state p {
    margin: 8px 0;
    font-size: 14px;
}
