/* Estilos para o Sistema de Autenticação - Design Exato da Pasta Login */

/* Modal de Autenticação */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 350px;
    overflow: hidden;
    position: relative;
    margin: 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.auth-modal-content.register-mode {
    padding-top: 20px;
    max-width: 400px;
    max-height: 90vh !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #333;
}

.auth-modal-header {
    background-color: #e8f5e8;
    padding: 20px 15px 15px;
    text-align: center;
    border-bottom: 3px solid #28a745;
}

.register-form .auth-modal-header {
    display: none;
}

.register-form.active ~ .auth-modal-header {
    display: none;
}

.auth-modal-content.register-mode .auth-modal-header {
    display: none;
}

.auth-modal-content.register-mode .auth-modal-body {
    padding-top: 20px;
}

.cart-icon {
    width: 40px;
    height: 40px;
    background-color: #28a745;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.auth-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d5a3d;
    margin-bottom: 8px;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: #5a6c57;
    line-height: 1.4;
}

.auth-modal-body {
    padding: 20px 15px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 180px;
    height: auto;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #28a745;
}

.form-input::placeholder {
    color: #999;
}

.forgot-password {
    text-align: left;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #28a745;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.login-btn:hover {
    background-color: #218838;
}

.register-link {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.register-link a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

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

.back-to-login {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.back-to-login a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.back-to-login a:hover {
    text-decoration: underline;
}

/* Estilos para formulário de cadastro */
.register-form {
    display: none;
}

.register-form.active {
    display: block !important;
}

.login-form {
    display: block;
}

.login-form.active {
    display: block !important;
}

/* Forçar exibição quando ativo */
.register-form.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.phone-input-container {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.phone-input-container:focus-within {
    border-color: #28a745;
}

.country-flag {
    display: none; /* Escondendo a bandeira */
}

.phone-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    width: 100%; /* Campo ocupa toda a largura */
}

.date-input {
    position: relative;
}

.date-input.error .form-input {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.foreign-link {
    display: none;
}

/* Estilos para campos de senha com ícone de olho */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #28a745;
}

/* Estilos para os ícones SVG de olho */
.password-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Estilos para botões de autenticação na navbar */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #28a745;
    border-radius: 6px;
    background: transparent;
    color: #28a745;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background-color: #28a745;
    color: white;
}

.auth-btn i {
    font-size: 16px;
}

.user-info {
    display: none;
    align-items: center;
    gap: 10px;
    color: #28a745;
    font-size: 14px;
    font-weight: 500;
}

.user-info.active {
    display: flex;
}

.logout-btn {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-modal-content {
        max-width: 85%;
        max-height: 75vh;
    }
    
    .auth-modal-content.register-mode {
        max-width: 95%;
        max-height: 95vh !important;
    }
    
    .auth-modal-header {
        padding: 12px 10px 10px;
    }
    
    .auth-modal-body {
        padding: 12px 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .logo-container {
        margin-bottom: 12px;
    }
    
    .login-btn {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .auth-buttons {
        gap: 5px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
