@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito';
}

body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.register-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 90%;
    max-width: 1000px;
    height: 720px;
    min-height: 600px;
}

.register-left-panel {
    flex: 1;
    background-color: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.ubuild-logo-white {
    width: 80px;
    margin-bottom: 20px;
}

.register-left-panel h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}

.register-left-panel p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.register-right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    position: relative;
    overflow-y: auto;
}

.register-form-wrapper {
    width: 100%;
}

.login-top-link {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 15px;
    color: #555;
}

.login-top-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.login-top-link a:hover {
    text-decoration: underline;
}

.register-right-panel h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 700;
    text-align: left;
    width: 100%;
    margin-top: 30px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #c3e6cb;
    font-size: 15px;
    text-align: center;
    width: 600px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #f5c6cb;
    font-size: 15px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    top: 15px;
    left: 15px;
    color: #888;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: #fff;
    padding: 0 5px;
    transform-origin: left top;
    z-index: 1;
}

/* Estilo para inputs de texto, password e date com placeholder flutuante */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 15px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none; /* Remove estilo padrão do select em navegadores webkit */
    -moz-appearance: none; /* Remove estilo padrão do select em navegadores mozilla */
    appearance: none; /* Remove estilo padrão do select */
}

/* Adicionando ícone de seta para select personalizado */
select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23888888" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
}


/* Move a label para cima e diminui a fonte quando o input/select está focado ou preenchido */
input[type="text"]:focus + label,
input[type="text"]:not(:placeholder-shown) + label,
input[type="email"]:focus + label,
input[type="email"]:not(:placeholder-shown) + label,
input[type="password"]:focus + label,
input[type="password"]:not(:placeholder-shown) + label,
input[type="date"]:focus + label,
input[type="date"]:not(:placeholder-shown) + label,
select:focus + label,
select:not([value=""]) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #007bff;
    font-weight: 600;
    z-index: 2;
}

/* Ajuste para inputs do tipo date, para que o placeholder não seja exibido pelo navegador */
input[type="date"]:not(:focus):not(:placeholder-shown) {
    color: #333; /* Mantém a cor do texto padrão */
}
/* Para quando o campo date está vazio e não focado, a label deve voltar ao normal */
input[type="date"]:not(:focus):placeholder-shown + label {
    top: 15px;
    left: 15px;
    font-size: 16px;
    color: #888;
}


input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
    background-color: #fff;
}

.error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    text-align: left;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    transition: color 0.2s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #333;
}

.captcha-group {
    margin-bottom: 25px;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.captcha-code {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #444;
    text-align: center;
    background-color: #e9e9e9;
    user-select: none;
    font-family: 'Courier New', Courier, monospace;
}

.refresh-captcha-btn {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s ease;
}

.refresh-captcha-btn:hover {
    background-color: #0056b3;
}


.checkbox-group.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 5px;
    margin-bottom: 30px;
}

.checkbox-group.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 3px;
}

.checkbox-group.terms-checkbox input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-group.terms-checkbox input[type="checkbox"]::before {
    content: '\2713'; /* Sinal de check (checkmark) */
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-group.terms-checkbox input[type="checkbox"]:checked::before {
    opacity: 1;
}

.checkbox-group.terms-checkbox label {
    position: static;
    transform: none;
    padding: 0;
    background-color: transparent;
    font-weight: 400;
    color: #555;
    font-size: 15px;
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-group.terms-checkbox label a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group.terms-checkbox label a:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Responsividade */
@media (max-width: 900px) {
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .register-left-panel {
        padding: 30px;
    }

    .register-left-panel h2 {
        font-size: 28px;
    }

    .register-right-panel {
        padding: 30px;
    }

    .login-top-link {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }

    .register-right-panel h2 {
        text-align: center;
    }
}

@media (max-width: 550px) {
    .register-container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    body {
        padding: 0;
    }

    .register-left-panel,
    .register-right-panel {
        padding: 20px;
    }

    .register-left-panel h2 {
        font-size: 24px;
    }

    .register-left-panel p {
        font-size: 14px;
    }

    .register-right-panel h2 {
        font-size: 24px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 16px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select {
        padding: 12px 15px;
        font-size: 15px;
    }

    .form-group label {
        font-size: 14px;
    }

    input[type="text"]:focus + label,
    input[type="text"]:not(:placeholder-shown) + label,
    input[type="email"]:focus + label,
    input[type="email"]:not(:placeholder-shown) + label,
    input[type="password"]:focus + label,
    input[type="password"]:not(:placeholder-shown) + label,
    input[type="date"]:focus + label,
    input[type="date"]:not(:placeholder-shown) + label,
    select:focus + label,
    select:not([value=""]) + label {
        font-size: 11px;
    }

    .captcha-code {
        font-size: 20px;
        letter-spacing: 3px;
    }

    .refresh-captcha-btn {
        font-size: 18px;
        padding: 8px 12px;
    }
}