﻿/* ============================================
   REGISTRATION FORM STYLES
   ============================================ */

/* Base form styles */
.registration-form {
    max-width: 100%;
    overflow-x: hidden;
    padding: 20px 15px;
    box-sizing: border-box;
}

    .registration-form *,
    .registration-form *::before,
    .registration-form *::after {
        box-sizing: border-box;
    }

/* Error states */
.input-error {
    border: 2px solid #a94442 !important;
    background-color: #fff8f8;
}

    .input-error:focus {
        border-color: #a94442 !important;
        box-shadow: 0 0 0 0.2rem rgba(169, 68, 66, 0.25);
    }

.label-error {
    color: #a94442 !important;
}

.Small-Error {
    color: #a94442;
    font-size: 12px;
    display: block;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 4px;
}

    .Small-Error.visible {
        min-height: 18px;
        max-height: 100px;
        opacity: 1;
    }

    .Small-Error a {
        color: #337ab7;
        text-decoration: underline;
    }

/* Password strength indicator */
.password-strength-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

.password-strength-bar {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

    .password-strength-fill.strength-weak {
        background-color: #d9534f;
    }

    .password-strength-fill.strength-medium {
        background-color: #f0ad4e;
    }

    .password-strength-fill.strength-strong {
        background-color: #5cb85c;
    }

.password-strength-text {
    font-size: 11px;
    color: #666;
}

.password-requirements {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 4px;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 15px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #337ab7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Show/Hide password toggle */
.toggle-password {
    cursor: pointer;
    user-select: none;
}

.show-hide-text {
    font-size: 12px;
    color: #337ab7;
}

/* reCAPTCHA container */
.recaptcha-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Agreements checkbox */
.agreements-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* Form group spacing */
.form-group {
    margin-bottom: 20px;
}

/* Input focus states */
.form-control-registration:focus {
    border-color: #66afe9;
    box-shadow: 0 0 0 0.2rem rgba(102, 175, 233, 0.25);
}

/* Success state (optional - for when field is valid) */
.input-success {
    border: 2px solid #5cb85c !important;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
    .registration-form {
        padding: 15px 10px;
    }

    .form-group.col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
        float: none !important;
        width: 100%;
    }

    .form-group.float-left,
    .form-group.float-right {
        float: none !important;
    }

    .registration-form-alertbidder {
        margin: 15px 10px;
        padding: 15px;
        font-size: 14px;
    }

    .recaptcha-container {
        padding: 10px;
        transform-origin: left top;
    }

    /* Scale reCAPTCHA on very small screens */
    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }

    .registerbutton {
        padding: 0 10px;
    }

    #SubmitBtn {
        font-size: 16px;
        padding: 12px 20px;
    }

    .password-strength-container {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .registration-form {
        padding: 10px 5px;
    }

    .form-group.col-md-6 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .g-recaptcha {
        transform: scale(0.77);
        transform-origin: center;
    }

    h1 {
        font-size: 24px;
    }

    .Small-Error {
        font-size: 11px;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
.form-control-registration:focus-visible {
    outline: 3px solid #66afe9;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .Small-Error,
    .password-strength-fill,
    .spinner {
        transition: none;
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .input-error {
        border-width: 3px;
    }

    .Small-Error {
        font-weight: bold;
    }
}
