/**
 * Register Page Styles
 * Styles for the user registration page
 */

/* Override Elementor styles */
.register-page {
    background: #f4f6fa;
    padding-top: 60px;
    padding-bottom: 60px;
}
.register-page,
.site-main.register-page,
#main.register-page {
    padding-left: 20px;
    padding-right: 20px;
}
.register-page .elementor-container,
.register-page .elementor-row,
.register-page .elementor-column,
.register-page .elementor-section {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

.register-container {
    display: flex;
    gap: 20px;
    max-width: 1320px;
    margin: 0 auto;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 0;
}

/* ============================================
   LEFT BANNER SECTION
   ============================================ */
.register-banner {
    position: relative;
    width: 514px;
    height: 646px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ============================================
   RIGHT FORM SECTION
   ============================================ */
.register-form-wrapper {
    flex: 1;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 45px 10px rgba(0, 0, 0, 0.1);
    padding: 60px 16px 20px;
    overflow-y: auto;
    height: 646px;
    box-sizing: border-box;
}

.register-form-container {
    max-width: 752px;
    margin: 0 auto;
    position: relative;
}

.form-title {
    font-weight: 900;
    font-size: 22px;
    line-height: 28px;
    color: #108d52;
    margin: 0 0 16px 0;
    white-space: nowrap;
}

/* User Type Selection */
.user-type-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.user-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 6px 13px;
    border-radius: 8px;
    border: none;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-type-btn.active {
    background: #a3ce4d;
}

.user-type-btn:not(.active) {
    background: rgba(182, 182, 182, 0.58);
}

.user-type-btn:hover {
    opacity: 0.9;
    background: #a3ce4d;
}

.user-type-btn:focus {
    background: #a3ce4d;
}

.user-type-btn .check-icon {
    display: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #ffffff;
}

.user-type-btn.active .check-icon {
    display: block;
}

.user-type-btn .check-icon img {
    width: 24px;
    height: 24px;
    display: block;
    filter: brightness(0) invert(1); /* Chuyển màu thành trắng cho stroke */
}

/* Form Sections */
.form-section {
    margin-bottom: 16px;
}

.section-title {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin: 0 0 7px 0;
}

.form-row {
    margin-bottom: 8px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.form-group-inline .form-group {
    min-width: 0;
}

.form-group-inline > .select-wrapper {
    min-width: 0;
}

.form-group-inline > .form-input {
    min-width: 0;
}

.form-group-inline > .form-group-composite {
    min-width: 0;
}

.form-group-inline .form-group-with-icon {
    min-width: 0;
}

/* Composite input group (select + input trong cùng 1 field) */
.form-group-composite {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: stretch;
    border: 1px solid #108d52;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.composite-separator {
    width: 1px;
    background: #d0d5dd;
    align-self: stretch;
    margin: 6px 0;
}

.form-group-composite .select-wrapper.select-inline {
    border: none;
    border-radius: 0;
}

.form-group-composite .select-wrapper.select-inline .form-select {
    border: none;
    border-radius: 0;
    padding: 10px 30px 10px 14px;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4' fill='none'%3E%3Cpath d='M3.99989 3.82C3.73323 3.82 3.49323 3.71333 3.27989 3.5L0.639893 0.86L1.35989 0.18L3.99989 2.82L6.63989 0.18L7.35989 0.86L4.71989 3.5C4.50656 3.71333 4.26656 3.82 3.99989 3.82Z' fill='%23667085'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
}

.form-group-composite .form-input-inline {
    border: none;
    border-radius: 0;
    padding: 10px 14px;
}

.form-group-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group-with-icon .input-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 16px;
    z-index: 1;
    pointer-events: none;
}

.form-group-with-icon .form-input {
    width: 100%;
    padding-left: 36px;
    padding-right: 40px;
}

.form-group-with-icon .password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

/* Email input - icon on left */
.form-group-with-icon input[type="email"] {
    padding-left: 36px;
    padding-right: 14px;
}

/* Password input - icon on right */
.form-group-with-icon input[type="password"],
.form-group-with-icon input[type="text"] {
    padding-left: 14px;
    padding-right: 40px;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #108d52;
    border-radius: 8px;
    font-weight: 400;
    font-size: 12px;
    line-height: normal;
    color: rgba(0, 0, 0, 0.87);
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: auto;
    min-height: 38px;
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.42);
    opacity: 1;
    font-size: 12px;
    line-height: normal;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #108d52;
    box-shadow: none;
}

.form-input:not(:placeholder-shown),
.form-select:not([value=""]) {
    color: rgba(0, 0, 0, 0.87);
}

.form-input.error,
.form-select.error {
    border-color: #ed3934;
    box-shadow: 0 0 0 2px rgba(237, 57, 52, 0.1);
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
    min-width: 80px;
}

.select-wrapper .form-select {
    appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4' fill='none'%3E%3Cpath d='M3.99989 3.82C3.73323 3.82 3.49323 3.71333 3.27989 3.5L0.639893 0.86L1.35989 0.18L3.99989 2.82L6.63989 0.18L7.35989 0.86L4.71989 3.5C4.50656 3.71333 4.26656 3.82 3.99989 3.82Z' fill='%23667085'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
}

.select-wrapper .form-select option {
    color: rgba(0, 0, 0, 0.87);
    background: #ffffff;
}

/* Hide the SVG arrow elements since we're using background-image */
.select-arrow {
    display: none;
}

/* Password Toggle */
.password-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin: 16px 0;
    max-width: 758px;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #108d52;
    cursor: pointer;
}

.form-checkbox label {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.87);
    cursor: pointer;
}

.form-checkbox .link {
    color: #108d52;
    text-decoration: underline;
    text-underline-position: from-font;
}

.form-checkbox .link:hover {
    text-decoration: none;
}

/* Submit Button */
.btn-submit {
    width: 258px;
    height: 40px;
    background: #108d52;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 16px auto 0;
    display: block;
}

.btn-submit:hover {
    background: #0d7a43;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Separator */
.form-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    width: 258px;
    justify-content: center;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: #838383;
}

.separator-text {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #838383;
}

/* Google Button */
.btn-google {
    width: 258px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #838383;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.btn-google:hover {
    background: #f5f5f5;
    border-color: #108d52;
}

.btn-google svg {
    width: 16px;
    height: 16px;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer p {
    font-weight: 400;
    font-size: 12px;
    line-height: 22px;
    color: #000000;
    margin: 0;
}

.form-footer .link {
    color: #108d52;
    text-decoration: underline;
    text-underline-position: from-font;
}

.form-footer .link:hover {
    text-decoration: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .register-container {
        gap: 16px;
    }
    
    .register-banner {
        width: 450px;
    }
}

@media (max-width: 992px) {
    .register-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .register-banner {
        width: 100%;
        height: auto;
        min-height: 400px;
    }
    
    .banner-image {
        height: auto;
    }
    
    .register-form-wrapper {
        max-width: 100%;
        max-height: none;
        padding: 20px 20px;
    }
}

@media (max-width: 768px) {
    .register-page,
    .site-main.register-page,
    #main.register-page {
        padding-left: 10px;
        padding-right: 10px;
    }
    .register-page {
        padding: 30px 10px;
    }
    
    .register-banner {
        display: none;
    }
    
    .form-title {
        font-size: 20px;
    }
    
    .user-type-selection {
        justify-content: center;
        gap: 8px;
    }
    
    .user-type-btn {
        flex: 1;
        font-size: 14px;
        padding: 6px 10px;
        height: 36px;
    }
    
    .form-group-inline {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-group-inline .select-wrapper {
        width: 100%;
    }
    
    .form-checkbox {
        align-items: center;
        gap: 8px;
    }
    
    .form-checkbox input[type="checkbox"] {
        margin-top: 0;
    }
    
    .form-checkbox label {
        font-size: 12px;
        line-height: 18px;
    }
    
    .btn-submit,
    .btn-google {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 18px;
    }
}

