/* Registration Form Styles */

/* Container */
.regis-newuser-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Form Header */
.regis-newuser-form h2 {
    color: #000000;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 1rem;
}

.regis-newuser-form h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #D4AF37, #FFD700);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333333;
    font-weight: 500;
}

.form-group label .required {
    color: #D4AF37;
    margin-left: 4px;
}

/* Form Inputs */
.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Helper Text */
.helper-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666666;
}

/* Submit Button */
.form-submit {
    margin-top: 2rem;
}

.form-submit button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #D4AF37, #FFD700);
    color: #000000;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.form-submit button:active {
    transform: translateY(0);
}

.form-submit button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
#form-messages {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
}

#form-messages.success {
    background-color: #f0f9eb;
    color: #67c23a;
    border: 1px solid #b3e19d;
    display: block;
}

#form-messages.error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fab6b6;
    display: block;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.toggle-password:hover {
    color: #D4AF37;
}

.toggle-password:focus {
    outline: none;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .regis-newuser-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .regis-newuser-form h2 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 0.7rem;
    }

    .form-submit button {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* Input Focus States */
.form-group input:focus::placeholder {
    color: #D4AF37;
    transition: color 0.3s ease;
}

/* Input Validation States */
.form-group input:invalid {
    border-color: #f56c6c;
}

.form-group input:valid {
    border-color: #67c23a;
}

/* Hover Effects */
.form-group input:hover {
    border-color: #D4AF37;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.regis-newuser-form {
    animation: fadeIn 0.5s ease-out;
}

/* Additional Helper Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

/* Privacy Notice */
.privacy-notice {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #666666;
    text-align: center;
}

.privacy-notice a {
    color: #D4AF37;
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* Required Field Indicator */
.required-text {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666666;
    text-align: right;
}

.required-text span {
    color: #D4AF37;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0;
    background: #D4AF37;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    display: block;
    font-size: 0.85rem;
    color: #666666;
    margin-top: 0.25rem;
}

/* Form Grid Layout for Larger Screens */
@media screen and (min-width: 768px) {
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* Error State Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group.error input {
    animation: shake 0.3s ease-in-out;
}

/* Success State Animations */
@keyframes success {
    from { transform: scale(1); }
    50% { transform: scale(1.02); }
    to { transform: scale(1); }
}

.form-group.success input {
    animation: success 0.3s ease-in-out;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #D4AF37;
}

.toggle-password .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
}

input[type="password"],
input[type="text"] {
    padding-right: 35px !important;
}

/* ปรับ input ให้มีพื้นที่สำหรับไอคอน */
.password-wrapper input {
    padding-right: 35px !important;
}