/* Estilos para os formulários de login e cadastro */
.cafe-login-form,
.cafe-register-form {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--theme-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cafe-login-form h2,
.cafe-register-form h2 {
    color: var(--theme-heading-color);
    margin-bottom: 1rem;
    font-family: var(--theme-heading-font);
    font-size: 2rem;
}

.cafe-register-form > p {
    color: var(--theme-text-color, #666666);
    margin-bottom: 2rem;
    font-family: var(--theme-text-font);
}

/* Garantir que o texto descritivo seja visível */
.cafe-register-form > p {
    color: #666666 !important;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--theme-text-color, #333333);
    font-family: var(--theme-text-font);
    font-weight: 500;
}

/* Garantir que os labels sejam visíveis nos formulários de auth */
.cafe-login-form .form-group label,
.cafe-register-form .form-group label {
    color: #333333 !important;
}

/* Estilo para dicas e textos auxiliares */
.login-tip {
    color: #666666 !important;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
    font-family: var(--theme-text-font);
}

/* Texto de campos obrigatórios */
.required-info {
    color: #666666 !important;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.required {
    color: #e74c3c !important;
}

/* Links de alternância entre formulários */
.cafe-login-form p,
.cafe-register-form p {
    color: #666666 !important;
    text-align: center;
    margin-top: 1.5rem;
}

.cafe-login-form p a,
.cafe-register-form p a,
.toggle-form {
    color: var(--theme-primary-color, #8B4513) !important;
    text-decoration: none;
    font-weight: 500;
}

.cafe-login-form p a:hover,
.cafe-register-form p a:hover,
.toggle-form:hover {
    text-decoration: underline;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--theme-border-color);
    border-radius: 4px;
    background: var(--theme-input-background);
    color: #333333 !important;
    font-family: var(--theme-text-font);
    transition: border-color 0.3s ease;
}

/* Garantir que o texto digitado seja visível nos formulários de login e cadastro */
.cafe-login-form input[type="text"],
.cafe-login-form input[type="email"],
.cafe-login-form input[type="password"],
.cafe-register-form input[type="text"],
.cafe-register-form input[type="email"],
.cafe-register-form input[type="password"],
.cafe-register-form input[type="tel"] {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
}

.form-group input:focus {
    outline: none;
    border-color: var(--theme-primary-color);
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
}

/* Garantir cor do texto no focus também */
.cafe-login-form input[type="text"]:focus,
.cafe-login-form input[type="email"]:focus,
.cafe-login-form input[type="password"]:focus,
.cafe-register-form input[type="text"]:focus,
.cafe-register-form input[type="email"]:focus,
.cafe-register-form input[type="password"]:focus,
.cafe-register-form input[type="tel"]:focus {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
}

/* Estilos para placeholders dos inputs */
.form-group input::placeholder {
    color: #999999 !important;
    opacity: 1;
}

.form-group input::-webkit-input-placeholder {
    color: #999999 !important;
    opacity: 1;
}

.form-group input::-moz-placeholder {
    color: #999999 !important;
    opacity: 1;
}

.form-group input:-ms-input-placeholder {
    color: #999999 !important;
    opacity: 1;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-code {
    background: var(--theme-input-background);
    padding: 0.75rem;
    border: 1px solid var(--theme-border-color);
    border-radius: 4px;
    color: #333333 !important;
    font-family: var(--theme-text-font);
}

.cafe-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--theme-primary-color);
    color: var(--theme-button-text-color);
    border: none;
    border-radius: 4px;
    font-family: var(--theme-text-font);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cafe-submit-btn:hover {
    background: var(--theme-primary-hover-color);
}

.cafe-submit-btn:disabled {
    background: var(--theme-disabled-color);
    cursor: not-allowed;
}

.form-group.terms {
    font-size: 0.9rem;
}

.form-group.terms label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-group.terms input[type="checkbox"] {
    margin-top: 0.25rem;
}

.form-group.terms a {
    color: var(--theme-primary-color);
    text-decoration: none;
}

.form-group.terms a:hover {
    text-decoration: underline;
}

.form-messages {
    margin-top: 1rem;
}

.form-messages .error {
    background: var(--theme-error-background);
    color: var(--theme-error-color);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: var(--theme-text-font);
}

.form-messages .success {
    background: var(--theme-success-background);
    color: var(--theme-success-color);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: var(--theme-text-font);
}

/* Botão Google */
.cafe-google-auth {
    margin-top: 20px;
    text-align: center;
}

.cafe-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: white;
    color: #757575;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--theme-text-font);
}

.cafe-google-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #333;
    text-decoration: none;
}

.cafe-auth-separator {
    position: relative;
    text-align: center;
    margin: 25px 0;
    color: #666;
}

.cafe-auth-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.cafe-auth-separator span {
    background: white;
    padding: 0 15px;
    position: relative;
}

/* Responsividade */
@media (max-width: 768px) {
    .cafe-login-form,
    .cafe-register-form {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

/* Centralizar mensagem de login */
.cafe-logged-in-message {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.cafe-logged-in-message a.logout-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: var(--theme-primary-color);
    color: var(--theme-button-text-color);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--theme-text-font);
    transition: background 0.2s;
}
.cafe-logged-in-message a.logout-btn:hover {
    background: var(--theme-primary-hover-color);
}

/* Layout Unificado para Login e Cadastro */
.cafe-login-wrapper,
.cafe-register-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 90vh;
    margin: 2rem auto;
    max-width: 1000px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    overflow: hidden;
    background: var(--theme-background, #fff);
}

/* Esconder o wrapper de registro por padrão */
.cafe-register-wrapper {
    display: none;
}

.cafe-auth-image {
    flex: 1 1 50%;
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.cafe-auth-form-side {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.cafe-login-form,
.cafe-register-form {
    width: 100%;
    max-width: 400px;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

@media (max-width: 900px) {
    .cafe-login-wrapper,
    .cafe-register-wrapper {
        flex-direction: column;
    }
    .cafe-auth-image {
        min-height: 250px;
    }
    .cafe-auth-form-side {
        padding: 2rem 1.5rem;
    }
}
@media (max-width: 600px) {
    .cafe-register-wrapper {
        margin: 0.5rem;
    }
    .cafe-register-form {
        padding: 0;
    }
}

/* ============================================
   ESTILOS PARA MOSTRAR/OCULTAR SENHA
   ============================================ */

.password-toggle-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.password-toggle .eye-open,
.password-toggle .eye-closed {
    display: none;
}

.password-toggle.showing .eye-open {
    display: block;
}

.password-toggle:not(.showing) .eye-closed {
    display: block;
}

/* Ajustar padding dos campos de senha */
input[type="text"].password-field,
input[type="password"].password-field {
    padding-right: 40px !important;
}

/* Garantir que o wrapper tenha posição relativa */
.form-group {
    position: relative;
}