/**
 * E2M Biometric Authentication Styles
 * 
 * Styles for biometric login buttons and forms.
 * Follows iOS and Android design guidelines.
 *
 * @package E2M\Auth
 */

/* Login form wrapper */
.e2m-login-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

/* Biometric login container */
#e2m-biometric-login-container {
    margin-bottom: 20px;
    text-align: center;
}

/* Biometric button - Matches Bricks Builder form styling */
.e2m-biometric-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: var(--hc-text-m, 16px);
    color: var(--hc-white, #ffffff);
    background-color: #111111;
    border-style: none;
    border-radius: 5px;
    padding: 14px 20px;
    cursor: pointer;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: var(--hc-space-m, 20px);
    text-align: center;
    line-height: 1.4;
}

.e2m-biometric-button:hover {
    background-color: #222222;
}

.e2m-biometric-button:active {
    background-color: #000000;
}

.e2m-biometric-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Icon within button */
.e2m-biometric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.e2m-biometric-icon svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Enable biometric button - matches primary button style */
.e2m-enable-biometric-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-size: var(--hc-text-m, 16px);
    color: var(--hc-white, #ffffff);
    background-color: #111111;
    border-style: none;
    border-radius: 5px;
    padding: 14px 20px;
    cursor: pointer;
    gap: 10px;
    transition: all 0.3s ease;
}

.e2m-enable-biometric-button:hover {
    background-color: #222222;
}

.e2m-enable-biometric-button:active {
    background-color: #000000;
}

.e2m-enable-biometric-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Divider between biometric and password login */
.e2m-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 14px;
}

.e2m-login-divider::before,
.e2m-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.e2m-login-divider::before {
    margin-right: 15px;
}

.e2m-login-divider::after {
    margin-left: 15px;
}

/* Form styling improvements */
#e2m-login-form input[type="text"],
#e2m-login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: border-color 0.3s ease;
}

#e2m-login-form input[type="text"]:focus,
#e2m-login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#e2m-login-form input[type="submit"] {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#e2m-login-form input[type="submit"]:hover {
    background: #000;
}

/* Wrapper styling to match form spacing */
.e2m-biometric-login-wrapper,
.e2m-enable-biometric-wrapper {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

#e2m-biometric-login-container {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Optional: Container with same styling as form */
.e2m-biometric-container {
    padding: var(--hc-space-s, 15px);
    background-color: var(--hc-border-primary, rgba(255, 255, 255, 0.1));
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Status message styling */
#e2m-biometric-status {
    font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--hc-text-s, 14px);
    color: var(--hc-white, #ffffff);
    padding: var(--hc-space-s, 15px);
    background-color: var(--hc-border-primary, rgba(255, 255, 255, 0.1));
    border-radius: 5px;
    margin-top: 10px;
}

/* Responsive adjustments - match Bricks mobile breakpoint */
@media (max-width: 478px) {
    .e2m-login-form-wrapper {
        padding: 15px;
    }
    
    .e2m-biometric-button,
    .e2m-enable-biometric-button {
        font-size: var(--hc-text-s, 14px);
    }
    
    .e2m-biometric-icon {
        font-size: 18px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .e2m-login-form-wrapper {
        color: #ffffff;
    }
    
    #e2m-login-form input[type="text"],
    #e2m-login-form input[type="password"] {
        background: #2a2a2a;
        border-color: #444;
        color: #ffffff;
    }
    
    .e2m-login-divider {
        color: #aaa;
    }
    
    .e2m-login-divider::before,
    .e2m-login-divider::after {
        border-color: #444;
    }
    
    .e2m-enable-biometric-button {
        background: #2a2a2a;
        color: #667eea;
        border-color: #667eea;
    }
    
    .e2m-enable-biometric-button:hover {
        background: #667eea;
        color: #ffffff;
    }
}

