/**
 * FastID SPID Login Frontend Styles
 */

/* Main wrapper */
.fastid-login-wrapper {
    margin: 20px 0;
    text-align: center;
}

/* Main button styles */
.fastid-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 44px;
    width: 100%;
    max-width: 300px;
}

.fastid-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fastid-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fastid-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Button icons */
.fastid-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.fastid-btn-icon svg {
    width: 100%;
    height: 100%;
}

/* Button text */
.fastid-btn-text {
    flex: 1;
    text-align: center;
}

/* Loading spinner */
.fastid-btn-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.fastid-login-btn[data-fastid-loading="true"] .fastid-btn-text {
    display: none;
}

.fastid-login-btn[data-fastid-loading="true"] .fastid-btn-spinner {
    display: flex;
}

.fastid-btn-spinner .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: fastid-spin 1s linear infinite;
}

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

/* SPID button styling */
.fastid-btn-spid {
    background: linear-gradient(135deg, #0066CC 0%, #004499 100%);
    color: white;
    border: 2px solid #0066CC;
}

.fastid-btn-spid:hover {
    background: linear-gradient(135deg, #0052A3 0%, #003377 100%);
    border-color: #0052A3;
}

.fastid-btn-spid:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* CIE button styling */
.fastid-btn-cie {
    background: linear-gradient(135deg, #228B22 0%, #006400 100%);
    color: white;
    border: 2px solid #228B22;
}

.fastid-btn-cie:hover {
    background: linear-gradient(135deg, #1E7B1E 0%, #004B00 100%);
    border-color: #1E7B1E;
}

.fastid-btn-cie:focus {
    outline: 2px solid #228B22;
    outline-offset: 2px;
}

/* eIDAS button styling */
.fastid-btn-eidas {
    background: linear-gradient(135deg, #8B008B 0%, #4B0082 100%);
    color: white;
    border: 2px solid #8B008B;
}

.fastid-btn-eidas:hover {
    background: linear-gradient(135deg, #7B007B 0%, #3B0062 100%);
    border-color: #7B007B;
}

.fastid-btn-eidas:focus {
    outline: 2px solid #8B008B;
    outline-offset: 2px;
}

/* Button sizes */
.fastid-btn-small {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.fastid-btn-small .fastid-btn-icon {
    width: 18px;
    height: 18px;
}

.fastid-btn-large {
    padding: 16px 32px;
    font-size: 18px;
    min-height: 52px;
}

.fastid-btn-large .fastid-btn-icon {
    width: 28px;
    height: 28px;
}

/* Responsive design */
@media (max-width: 768px) {
    .fastid-login-btn {
        width: 100%;
        max-width: none;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .fastid-login-btn {
        transition: none;
    }

    .fastid-login-btn:hover {
        transform: none;
    }

    .fastid-btn-spinner .spinner {
        animation: none;
        border: 2px solid currentColor;
        border-top: 2px solid transparent;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fastid-login-btn {
        border-width: 3px;
    }

    .fastid-btn-spid {
        background: #0066CC;
        border-color: #ffffff;
    }

    .fastid-btn-cie {
        background: #228B22;
        border-color: #ffffff;
    }

    .fastid-btn-eidas {
        background: #8B008B;
        border-color: #ffffff;
    }
}

/* Error message styling */
.fastid-error {
    background: #fff;
    border-left: 4px solid #dc3232;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 20px 0;
    padding: 15px;
}

.fastid-error p {
    margin: 0;
    font-size: 14px;
    color: #23282d;
}

/* Success message styling */
.fastid-success {
    background: #fff;
    border-left: 4px solid #46b450;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 20px 0;
    padding: 15px;
}

.fastid-success p {
    margin: 0;
    font-size: 14px;
    color: #23282d;
}

/* WooCommerce integration styles */
.woocommerce .fastid-login-wrapper {
    margin: 15px 0 20px 0;
}

.woocommerce-form-login .fastid-login-wrapper,
.woocommerce-form-register .fastid-login-wrapper {
    border-top: 1px solid #e1e1e1;
    margin-top: 20px;
    padding-top: 20px;
}

/* Admin preview styles */
.fastid-btn-preview {
    max-width: 250px;
    margin: 10px 0;
}

/* Hidden elements */
.fastid-login-wrapper a[style*="display: none"] {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Email warning notice */
.fastid-email-warning {
    background: #fff8e1;
    border-left: 4px solid #ffb900;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.fastid-email-warning p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.fastid-email-warning strong {
    color: #533101;
    font-weight: 600;
}

.fastid-email-warning a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    margin-left: 10px;
    display: inline-block;
}

.fastid-email-warning a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* WooCommerce specific styling */
.woocommerce .fastid-email-warning {
    margin: 20px 0;
}

.woocommerce-checkout .fastid-email-warning {
    background: #fff3cd;
    border-color: #ffc107;
    margin-bottom: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fastid-email-warning {
        margin: 10px 0;
        padding: 12px;
    }

    .fastid-email-warning a {
        display: block;
        margin: 8px 0 0 0;
    }
}
